mirror of
https://github.com/theupdateframework/python-tuf
synced 2026-05-24 10:08:28 +00:00
Fix remaining unit test failures for repository_tool.py
This commit is contained in:
parent
15777a309f
commit
b7c3b7c198
1 changed files with 3 additions and 10 deletions
|
|
@ -382,11 +382,9 @@ def test_get_filepaths_in_directory(self):
|
|||
# Verify the expected filenames. get_filepaths_in_directory() returns
|
||||
# a list of absolute paths.
|
||||
metadata_files = repo.get_filepaths_in_directory(metadata_directory)
|
||||
expected_files = ['1.root.json', '1.root.json.gz', 'root.json',
|
||||
'targets.json', 'targets.json.gz', 'snapshot.json',
|
||||
'snapshot.json.gz', 'timestamp.json',
|
||||
'timestamp.json.gz', 'role1.json', 'role1.json.gz',
|
||||
'role2.json', 'role2.json.gz']
|
||||
expected_files = ['1.root.json', 'root.json',
|
||||
'targets.json', 'snapshot.json',
|
||||
'timestamp.json', 'role1.json', 'role2.json']
|
||||
|
||||
basenames = []
|
||||
for filepath in metadata_files:
|
||||
|
|
@ -1683,11 +1681,6 @@ def test_load_repository(self):
|
|||
with open(bad_root_content, 'wb') as file_object:
|
||||
file_object.write(b'bad')
|
||||
|
||||
# Remove the compressed version of role1 to test whether the
|
||||
# load_repository() complains or not (it logs a message).
|
||||
role1_path = os.path.join(metadata_directory, 'role1.json.gz')
|
||||
os.remove(role1_path)
|
||||
|
||||
repository = repo_tool.load_repository(repository_directory)
|
||||
self.assertTrue(isinstance(repository, repo_tool.Repository))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue