Skip to content

Commit

Permalink
Merge pull request #55 from level12/54-fix-test-issues
Browse files Browse the repository at this point in the history
fix test assert values
  • Loading branch information
guruofgentoo committed Dec 14, 2021
2 parents 19c1881 + d1793e4 commit 02003a8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions keg_storage/tests/test_backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,8 @@ def test_create_link_token_success(self, tmp_path: pathlib.Path):
}
assert header == {
'alg': 'HS512',
'iat': arrow.get(2020, 4, 27).timestamp,
'exp': arrow.get(2020, 4, 27, 1).timestamp
'iat': arrow.get(2020, 4, 27).timestamp(),
'exp': arrow.get(2020, 4, 27, 1).timestamp()
}

def test_deserialize_link_token_no_secret_key(self, tmp_path: pathlib.Path):
Expand Down
6 changes: 3 additions & 3 deletions keg_storage/tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def test_get_file_not_found(self, m_get_interface):
FileNotFoundInStorageError('abc', 'def')

results = self.invoke('foo/bar', 'bar', exit_code=1)
assert results.output == 'Error: Could not open file def: Not found in abc.\n'
assert results.output == "Error: Could not open file 'def': Not found in abc.\n"


@mock.patch.object(current_app.storage, 'get_interface', autospec=True, spec_set=True)
Expand Down Expand Up @@ -164,7 +164,7 @@ def test_delete_file_not_found(self, m_get_interface):
m_get_interface.return_value.delete.side_effect = FileNotFoundInStorageError('abc', 'def')

results = self.invoke('foo/bar', exit_code=1)
assert results.output == 'Error: Could not open file def: Not found in abc.\n'
assert results.output == "Error: Could not open file 'def': Not found in abc.\n"


@mock.patch.object(current_app.storage, 'get_interface', autospec=True, spec_set=True)
Expand Down Expand Up @@ -255,5 +255,5 @@ def test_file_not_found(self, m_reencrypt, m_get_interface):
assert results.output.splitlines() == [
'Old Key: ',
'New Key: ',
'Error: Could not open file def: Not found in abc.'
"Error: Could not open file 'def': Not found in abc."
]

0 comments on commit 02003a8

Please sign in to comment.