@@ -70,8 +70,8 @@ def setUpClass(cls):
7070 cls .keystore [role ] = SSlibSigner (key_dict )
7171
7272 def hashes_length_modifier (timestamp : Timestamp ) -> None :
73- timestamp .meta [ "snapshot.json" ] .hashes = None
74- timestamp .meta [ "snapshot.json" ] .length = None
73+ timestamp .snapshot_meta .hashes = None
74+ timestamp .snapshot_meta .length = None
7575
7676 cls .metadata ["timestamp" ] = cls .modify_metadata (
7777 cls , "timestamp" , hashes_length_modifier
@@ -245,13 +245,13 @@ def version_modifier(timestamp: Timestamp) -> None:
245245
246246 def test_update_timestamp_snapshot_ver_below_current (self ):
247247 def bump_snapshot_version (timestamp : Timestamp ) -> None :
248- timestamp .meta [ "snapshot.json" ] .version = 2
248+ timestamp .snapshot_meta .version = 2
249249
250250 # set current known snapshot.json version to 2
251251 timestamp = self .modify_metadata ("timestamp" , bump_snapshot_version )
252252 self .trusted_set .update_timestamp (timestamp )
253253
254- # newtimestamp.meta["snapshot.json"]. version < trusted_timestamp.meta["snapshot.json"] .version
254+ # newtimestamp.meta. version < trusted_timestamp.meta.version
255255 with self .assertRaises (exceptions .ReplayedMetadataError ):
256256 self .trusted_set .update_timestamp (self .metadata ["timestamp" ])
257257
@@ -271,7 +271,7 @@ def timestamp_expired_modifier(timestamp: Timestamp) -> None:
271271
272272 def test_update_snapshot_length_or_hash_mismatch (self ):
273273 def modify_snapshot_length (timestamp : Timestamp ) -> None :
274- timestamp .meta [ "snapshot.json" ] .length = 1
274+ timestamp .snapshot_meta .length = 1
275275
276276 # set known snapshot.json length to 1
277277 timestamp = self .modify_metadata ("timestamp" , modify_snapshot_length )
@@ -289,7 +289,7 @@ def test_update_snapshot_cannot_verify_snapshot_with_threshold(self):
289289
290290 def test_update_snapshot_version_different_timestamp_snapshot_version (self ):
291291 def timestamp_version_modifier (timestamp : Timestamp ) -> None :
292- timestamp .meta [ "snapshot.json" ] .version = 2
292+ timestamp .snapshot_meta .version = 2
293293
294294 timestamp = self .modify_metadata ("timestamp" , timestamp_version_modifier )
295295 self .trusted_set .update_timestamp (timestamp )
@@ -341,7 +341,7 @@ def snapshot_expired_modifier(snapshot: Snapshot) -> None:
341341
342342 def test_update_snapshot_successful_rollback_checks (self ):
343343 def meta_version_bump (timestamp : Timestamp ) -> None :
344- timestamp .meta [ "snapshot.json" ] .version += 1
344+ timestamp .snapshot_meta .version += 1
345345
346346 def version_bump (snapshot : Snapshot ) -> None :
347347 snapshot .version += 1
0 commit comments