Skip to content

Commit f90b33f

Browse files
committed
Minifying tests
1 parent f59f939 commit f90b33f

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

tests/sparsezoo/utils/test_authentication.py

+7-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Copyright (c) 2021 - present / Neuralmagic, Inc. All Rights Reserved.
2-
#
2+
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
55
# You may obtain a copy of the License at
6-
#
6+
#
77
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
8+
#
99
# Unless required by applicable law or agreed to in writing,
1010
# software distributed under the License is distributed on an "AS IS" BASIS,
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -37,18 +37,17 @@ def test_load_token_yaml_fail(tmp_path):
3737
assert _maybe_load_token(path) is None
3838

3939

40+
_OLD_DATE = (datetime.now() - timedelta(days=40)).timestamp()
41+
42+
4043
@pytest.mark.parametrize(
4144
"content",
4245
[
4346
{},
4447
{CREDENTIALS_YAML_TOKEN_KEY: {}},
4548
{CREDENTIALS_YAML_TOKEN_KEY: {"token": "asdf"}},
4649
{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}},
5251
],
5352
)
5453
def test_load_token_failure_cases(tmp_path, content):

0 commit comments

Comments
 (0)