Skip to content

Commit e468d2c

Browse files
author
Jussi Kukkonen
authored
Merge pull request #1541 from MVrachev/move-serialization-tests
Remove duplicate serialization tests from test_api
2 parents e242a75 + 4574344 commit e468d2c

1 file changed

Lines changed: 0 additions & 44 deletions

File tree

tests/test_api.py

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
Timestamp,
2929
Targets,
3030
Key,
31-
Role,
3231
MetaFile,
3332
TargetFile,
3433
Delegations,
@@ -422,49 +421,6 @@ def test_metadata_verify_delegate(self):
422421
root.verify_delegate('snapshot', snapshot)
423422

424423

425-
def test_key_class(self):
426-
keys = {
427-
"59a4df8af818e9ed7abe0764c0b47b4240952aa0d179b5b78346c470ac30278d":{
428-
"keytype": "ed25519",
429-
"keyval": {
430-
"public": "edcd0a32a07dce33f7c7873aaffbff36d20ea30787574ead335eefd337e4dacd"
431-
},
432-
"scheme": "ed25519"
433-
},
434-
}
435-
for key_dict in keys.values():
436-
# Test creating an instance without a required attribute.
437-
for key in key_dict.keys():
438-
test_key_dict = key_dict.copy()
439-
del test_key_dict[key]
440-
with self.assertRaises(KeyError):
441-
Key.from_dict("id", test_key_dict)
442-
443-
444-
def test_role_class(self):
445-
roles = {
446-
"root": {
447-
"keyids": [
448-
"4e777de0d275f9d28588dd9a1606cc748e548f9e22b6795b7cb3f63f98035fcb"
449-
],
450-
"threshold": 1
451-
},
452-
"snapshot": {
453-
"keyids": [
454-
"59a4df8af818e9ed7abe0764c0b47b4240952aa0d179b5b78346c470ac30278d"
455-
],
456-
"threshold": 1
457-
},
458-
}
459-
for role_dict in roles.values():
460-
# Test creating an instance without a required attribute.
461-
for role_attr in role_dict.keys():
462-
test_role_dict = role_dict.copy()
463-
del test_role_dict[role_attr]
464-
with self.assertRaises(KeyError):
465-
Role.from_dict(test_role_dict)
466-
467-
468424
def test_metadata_root(self):
469425
root_path = os.path.join(
470426
self.repo_dir, 'metadata', 'root.json')

0 commit comments

Comments
 (0)