File tree 1 file changed +7
-8
lines changed
1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change 1
1
# Copyright (c) 2021 - present / Neuralmagic, Inc. All Rights Reserved.
2
- #
2
+ #
3
3
# Licensed under the Apache License, Version 2.0 (the "License");
4
4
# you may not use this file except in compliance with the License.
5
5
# You may obtain a copy of the License at
6
- #
6
+ #
7
7
# http://www.apache.org/licenses/LICENSE-2.0
8
- #
8
+ #
9
9
# Unless required by applicable law or agreed to in writing,
10
10
# software distributed under the License is distributed on an "AS IS" BASIS,
11
11
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -37,18 +37,17 @@ def test_load_token_yaml_fail(tmp_path):
37
37
assert _maybe_load_token (path ) is None
38
38
39
39
40
+ _OLD_DATE = (datetime .now () - timedelta (days = 40 )).timestamp ()
41
+
42
+
40
43
@pytest .mark .parametrize (
41
44
"content" ,
42
45
[
43
46
{},
44
47
{CREDENTIALS_YAML_TOKEN_KEY : {}},
45
48
{CREDENTIALS_YAML_TOKEN_KEY : {"token" : "asdf" }},
46
49
{CREDENTIALS_YAML_TOKEN_KEY : {"created" : "asdf" }},
47
- {
48
- CREDENTIALS_YAML_TOKEN_KEY : {
49
- "created" : (datetime .now () - timedelta (days = 40 )).timestamp ()
50
- }
51
- },
50
+ {CREDENTIALS_YAML_TOKEN_KEY : {"created" : _OLD_DATE }},
52
51
],
53
52
)
54
53
def test_load_token_failure_cases (tmp_path , content ):
You can’t perform that action at this time.
0 commit comments