File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -1452,13 +1452,18 @@ def check_prefixes_match_range():
1452
1452
list_of_targets , public_keys , number_of_bins = 3 )
1453
1453
1454
1454
# Invalid 'list_of_targets'.
1455
- # TODO
1456
- """
1457
- invalid_targets = ['/non-existent']
1458
- self.assertRaises(securesystemslib.exceptions.Error,
1455
+ # A path or target starting with a directory separator
1456
+ self .assertRaises (tuf .exceptions .InvalidNameError ,
1457
+ self .targets_object .delegate_hashed_bins ,
1458
+ ['/file1.txt' ], public_keys ,
1459
+ number_of_bins = 2 )
1460
+
1461
+ # A path or target using '\' as a directory separator
1462
+ self .assertRaises (tuf .exceptions .InvalidNameError ,
1459
1463
self .targets_object .delegate_hashed_bins ,
1460
- invalid_targets, public_keys, number_of_bins=16)
1461
- """
1464
+ ['subpath\\ file1.txt' ], public_keys ,
1465
+ number_of_bins = 2 )
1466
+
1462
1467
1463
1468
def test_add_target_to_bin (self ):
1464
1469
# Test normal case.
You can’t perform that action at this time.
0 commit comments