mirror of
https://github.com/theupdateframework/python-tuf
synced 2026-05-24 10:08:28 +00:00
Fix unit tests for _target_matchese_path_pattern()
Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
This commit is contained in:
parent
f40a6d58b7
commit
fd685bf22c
1 changed files with 7 additions and 4 deletions
|
|
@ -1803,13 +1803,16 @@ def test__init__(self):
|
|||
|
||||
|
||||
|
||||
def test_paths_match_target(self):
|
||||
def test__target_matches_path_pattern(self):
|
||||
map_file = os.path.join(self.client_directory, 'map.json')
|
||||
multi_repo_updater = updater.MultiRepoUpdater(map_file)
|
||||
paths = ['foo*.tgz', 'bar*.tgz', 'file1.txt']
|
||||
self.assertTrue(multi_repo_updater.paths_match_target(paths, 'bar-1.0.tgz'))
|
||||
self.assertTrue(multi_repo_updater.paths_match_target(paths, 'file1.txt'))
|
||||
self.assertFalse(multi_repo_updater.paths_match_target(paths, 'baz-1.0.tgz'))
|
||||
self.assertTrue(
|
||||
multi_repo_updater._target_matches_path_pattern('bar-1.0.tgz', paths))
|
||||
self.assertTrue(
|
||||
multi_repo_updater._target_matches_path_pattern('file1.txt', paths))
|
||||
self.assertFalse(
|
||||
multi_repo_updater._target_matches_path_pattern('baz-1.0.tgz', paths))
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue