@@ -96,10 +96,9 @@ def test_get_repository_properties(self, containerregistry_endpoint):
9696 def test_update_repository_properties (self , containerregistry_endpoint ):
9797 repository = self .get_resource_name ("repo" )
9898 tag_identifier = self .get_resource_name ("tag" )
99- self .import_image (containerregistry_endpoint , HELLO_WORLD , ["{ }:{}" . format ( repository , tag_identifier ) ])
99+ self .import_image (containerregistry_endpoint , HELLO_WORLD , [f" { repository } :{ tag_identifier } " ])
100100 with self .create_registry_client (containerregistry_endpoint ) as client :
101101 properties = client .get_repository_properties (repository )
102-
103102 properties .can_delete = False
104103 properties .can_read = False
105104 properties .can_list = False
@@ -128,7 +127,7 @@ def test_update_repository_properties(self, containerregistry_endpoint):
128127 def test_update_repository_properties_kwargs (self , containerregistry_endpoint ):
129128 repo = self .get_resource_name ("repo" )
130129 tag = self .get_resource_name ("tag" )
131- self .import_image (containerregistry_endpoint , HELLO_WORLD , ["{ }:{}" . format ( repo , tag ) ])
130+ self .import_image (containerregistry_endpoint , HELLO_WORLD , [f" { repo } :{ tag } " ])
132131
133132 with self .create_registry_client (containerregistry_endpoint ) as client :
134133 properties = client .get_repository_properties (repo )
@@ -255,7 +254,7 @@ def test_list_registry_artifacts_ascending(self, containerregistry_endpoint):
255254 def test_get_manifest_properties (self , containerregistry_endpoint ):
256255 repo = self .get_resource_name ("repo" )
257256 tag = self .get_resource_name ("tag" )
258- self .import_image (containerregistry_endpoint , HELLO_WORLD , ["{ }:{}" . format ( repo , tag ) ])
257+ self .import_image (containerregistry_endpoint , HELLO_WORLD , [f" { repo } :{ tag } " ])
259258
260259 with self .create_registry_client (containerregistry_endpoint ) as client :
261260 properties = client .get_manifest_properties (repo , tag )
@@ -269,7 +268,7 @@ def test_get_manifest_properties(self, containerregistry_endpoint):
269268 def test_get_manifest_properties_does_not_exist (self , containerregistry_endpoint ):
270269 repo = self .get_resource_name ("repo" )
271270 tag = self .get_resource_name ("tag" )
272- self .import_image (containerregistry_endpoint , HELLO_WORLD , ["{ }:{}" . format ( repo , tag ) ])
271+ self .import_image (containerregistry_endpoint , HELLO_WORLD , [f" { repo } :{ tag } " ])
273272
274273 with self .create_registry_client (containerregistry_endpoint ) as client :
275274 manifest = client .get_manifest_properties (repo , tag )
@@ -286,7 +285,7 @@ def test_get_manifest_properties_does_not_exist(self, containerregistry_endpoint
286285 def test_update_manifest_properties (self , containerregistry_endpoint ):
287286 repo = self .get_resource_name ("repo" )
288287 tag = self .get_resource_name ("tag" )
289- self .import_image (containerregistry_endpoint , HELLO_WORLD , ["{ }:{}" . format ( repo , tag ) ])
288+ self .import_image (containerregistry_endpoint , HELLO_WORLD , [f" { repo } :{ tag } " ])
290289
291290 with self .create_registry_client (containerregistry_endpoint ) as client :
292291 properties = client .get_manifest_properties (repo , tag )
@@ -319,7 +318,7 @@ def test_update_manifest_properties(self, containerregistry_endpoint):
319318 def test_update_manifest_properties_kwargs (self , containerregistry_endpoint ):
320319 repo = self .get_resource_name ("repo" )
321320 tag = self .get_resource_name ("tag" )
322- self .import_image (containerregistry_endpoint , HELLO_WORLD , ["{ }:{}" . format ( repo , tag ) ])
321+ self .import_image (containerregistry_endpoint , HELLO_WORLD , [f" { repo } :{ tag } " ])
323322
324323 with self .create_registry_client (containerregistry_endpoint ) as client :
325324 properties = client .get_manifest_properties (repo , tag )
@@ -349,7 +348,7 @@ def test_update_manifest_properties_kwargs(self, containerregistry_endpoint):
349348 def test_get_tag_properties (self , containerregistry_endpoint ):
350349 repo = self .get_resource_name ("repo" )
351350 tag = self .get_resource_name ("tag" )
352- self .import_image (containerregistry_endpoint , HELLO_WORLD , ["{ }:{}" . format ( repo , tag ) ])
351+ self .import_image (containerregistry_endpoint , HELLO_WORLD , [f" { repo } :{ tag } " ])
353352
354353 with self .create_registry_client (containerregistry_endpoint ) as client :
355354 properties = client .get_tag_properties (repo , tag )
@@ -369,7 +368,7 @@ def test_get_tag_properties_does_not_exist(self, containerregistry_endpoint):
369368 def test_update_tag_properties (self , containerregistry_endpoint ):
370369 repo = self .get_resource_name ("repo" )
371370 tag = self .get_resource_name ("tag" )
372- self .import_image (containerregistry_endpoint , HELLO_WORLD , ["{ }:{}" . format ( repo , tag ) ])
371+ self .import_image (containerregistry_endpoint , HELLO_WORLD , [f" { repo } :{ tag } " ])
373372
374373 with self .create_registry_client (containerregistry_endpoint ) as client :
375374 properties = client .get_tag_properties (repo , tag )
@@ -401,7 +400,7 @@ def test_update_tag_properties(self, containerregistry_endpoint):
401400 def test_update_tag_properties_kwargs (self , containerregistry_endpoint ):
402401 repo = self .get_resource_name ("repo" )
403402 tag = self .get_resource_name ("tag" )
404- self .import_image (containerregistry_endpoint , HELLO_WORLD , ["{ }:{}" . format ( repo , tag ) ])
403+ self .import_image (containerregistry_endpoint , HELLO_WORLD , [f" { repo } :{ tag } " ])
405404
406405 with self .create_registry_client (containerregistry_endpoint ) as client :
407406 properties = client .get_tag_properties (repo , tag )
@@ -431,13 +430,13 @@ def test_update_tag_properties_kwargs(self, containerregistry_endpoint):
431430 def test_list_tag_properties (self , containerregistry_endpoint ):
432431 repo = self .get_resource_name ("repo" )
433432 tag = self .get_resource_name ("tag" )
434- tags = ["{ }:{}" . format ( repo , tag + str (i )) for i in range (4 )]
433+ tags = [f" { repo } :{ tag + str (i )} " for i in range (4 )]
435434 self .import_image (containerregistry_endpoint , HELLO_WORLD , tags )
436435
437436 with self .create_registry_client (containerregistry_endpoint ) as client :
438437 count = 0
439438 for tag in client .list_tag_properties (repo ):
440- assert "{ }:{}" . format ( repo , tag .name ) in tags
439+ assert f" { repo } :{ tag .name } " in tags
441440 count += 1
442441 assert count == 4
443442
@@ -446,14 +445,14 @@ def test_list_tag_properties(self, containerregistry_endpoint):
446445 def test_list_tag_properties_order_descending (self , containerregistry_endpoint ):
447446 repo = self .get_resource_name ("repo" )
448447 tag = self .get_resource_name ("tag" )
449- tags = ["{ }:{}" . format ( repo , tag + str (i )) for i in range (4 )]
448+ tags = [f" { repo } :{ tag + str (i )} " for i in range (4 )]
450449 self .import_image (containerregistry_endpoint , HELLO_WORLD , tags )
451450
452451 with self .create_registry_client (containerregistry_endpoint ) as client :
453452 prev_last_updated_on = None
454453 count = 0
455454 for tag in client .list_tag_properties (repo , order_by = ArtifactTagOrder .LAST_UPDATED_ON_DESCENDING ):
456- assert "{ }:{}" . format ( repo , tag .name ) in tags
455+ assert f" { repo } :{ tag .name } " in tags
457456 if prev_last_updated_on :
458457 assert tag .last_updated_on < prev_last_updated_on
459458 prev_last_updated_on = tag .last_updated_on
@@ -463,7 +462,7 @@ def test_list_tag_properties_order_descending(self, containerregistry_endpoint):
463462 prev_last_updated_on = None
464463 count = 0
465464 for tag in client .list_tag_properties (repo , order_by = "timedesc" ):
466- assert "{ }:{}" . format ( repo , tag .name ) in tags
465+ assert f" { repo } :{ tag .name } " in tags
467466 if prev_last_updated_on :
468467 assert tag .last_updated_on < prev_last_updated_on
469468 prev_last_updated_on = tag .last_updated_on
@@ -475,14 +474,14 @@ def test_list_tag_properties_order_descending(self, containerregistry_endpoint):
475474 def test_list_tag_properties_order_ascending (self , containerregistry_endpoint ):
476475 repo = self .get_resource_name ("repo" )
477476 tag = self .get_resource_name ("tag" )
478- tags = ["{ }:{}" . format ( repo , tag + str (i )) for i in range (4 )]
477+ tags = [f" { repo } :{ tag + str (i )} " for i in range (4 )]
479478 self .import_image (containerregistry_endpoint , HELLO_WORLD , tags )
480479
481480 with self .create_registry_client (containerregistry_endpoint ) as client :
482481 prev_last_updated_on = None
483482 count = 0
484483 for tag in client .list_tag_properties (repo , order_by = ArtifactTagOrder .LAST_UPDATED_ON_ASCENDING ):
485- assert "{ }:{}" . format ( repo , tag .name ) in tags
484+ assert f" { repo } :{ tag .name } " in tags
486485 if prev_last_updated_on :
487486 assert tag .last_updated_on > prev_last_updated_on
488487 prev_last_updated_on = tag .last_updated_on
@@ -492,7 +491,7 @@ def test_list_tag_properties_order_ascending(self, containerregistry_endpoint):
492491 prev_last_updated_on = None
493492 count = 0
494493 for tag in client .list_tag_properties (repo , order_by = "timeasc" ):
495- assert "{ }:{}" . format ( repo , tag .name ) in tags
494+ assert f" { repo } :{ tag .name } " in tags
496495 if prev_last_updated_on :
497496 assert tag .last_updated_on > prev_last_updated_on
498497 prev_last_updated_on = tag .last_updated_on
@@ -504,15 +503,15 @@ def test_list_tag_properties_order_ascending(self, containerregistry_endpoint):
504503 def test_delete_tag (self , containerregistry_endpoint ):
505504 repo = self .get_resource_name ("repo" )
506505 tag = self .get_resource_name ("tag" )
507- tags = ["{ }:{}" . format ( repo , tag + str (i )) for i in range (4 )]
506+ tags = [f" { repo } :{ tag + str (i )} " for i in range (4 )]
508507 self .import_image (containerregistry_endpoint , HELLO_WORLD , tags )
509508
510509 with self .create_registry_client (containerregistry_endpoint ) as client :
511510 client .delete_tag (repo , tag + str (0 ))
512511
513512 count = 0
514513 for tag in client .list_tag_properties (repo ):
515- assert "{ }:{}" . format ( repo , tag .name ) in tags [1 :]
514+ assert f" { repo } :{ tag .name } " in tags [1 :]
516515 count += 1
517516 assert count == 3
518517
@@ -527,7 +526,7 @@ def test_delete_tag_does_not_exist(self, containerregistry_endpoint):
527526 def test_delete_manifest (self , containerregistry_endpoint ):
528527 repo = self .get_resource_name ("repo" )
529528 tag = self .get_resource_name ("tag" )
530- self .import_image (containerregistry_endpoint , HELLO_WORLD , ["{ }:{}" . format ( repo , tag ) ])
529+ self .import_image (containerregistry_endpoint , HELLO_WORLD , [f" { repo } :{ tag } " ])
531530
532531 with self .create_registry_client (containerregistry_endpoint ) as client :
533532 client .delete_manifest (repo , tag )
@@ -542,7 +541,7 @@ def test_delete_manifest(self, containerregistry_endpoint):
542541 def test_delete_manifest_does_not_exist (self , containerregistry_endpoint ):
543542 repo = self .get_resource_name ("repo" )
544543 tag = self .get_resource_name ("tag" )
545- self .import_image (containerregistry_endpoint , HELLO_WORLD , ["{ }:{}" . format ( repo , tag ) ])
544+ self .import_image (containerregistry_endpoint , HELLO_WORLD , [f" { repo } :{ tag } " ])
546545
547546 with self .create_registry_client (containerregistry_endpoint ) as client :
548547 manifest = client .get_manifest_properties (repo , tag )
0 commit comments