try fixing test

Signed-off-by: Trishank K Kuppusamy <trishank.kuppusamy@datadoghq.com>
This commit is contained in:
Trishank K Kuppusamy 2018-03-15 16:57:14 -04:00
parent 0e65ba0766
commit d452739017
No known key found for this signature in database
GPG key ID: B4AF1C9C73518187

View file

@ -331,7 +331,8 @@ def test_writeall(self):
# snapshot modifies the Root metadata, which specifies whether a repository
# supports consistent snapshots. Verify that an exception is raised due to
# the missing signatures of Root and Snapshot.
self.assertRaises(tuf.exceptions.UnsignedMetadataError, repository.writeall, True)
repository.root.unload_signing_key(root_privkey)
self.assertRaises(tuf.exceptions.UnsignedMetadataError, repository.writeall, consistent_snapshot=True)
# Load the private keys of Root and Snapshot (new version required since
# Root will change to enable consistent snapshots.