diff --git a/src/_zkapauthorizer/tests/strategies.py b/src/_zkapauthorizer/tests/strategies.py index d8b48e243af5b1161ce77d4376ea9af47bbace8d..d468030d111774a4090ad3e544952b4651895f56 100644 --- a/src/_zkapauthorizer/tests/strategies.py +++ b/src/_zkapauthorizer/tests/strategies.py @@ -142,7 +142,7 @@ def tahoe_config_texts(storage_client_plugins, shares): def merge_shares(shares, the_rest): for (k, v) in zip(("needed", "happy", "total"), shares): if v is not None: - the_rest["shares." + k] = "{}".format(v) + the_rest["shares." + k] = f"{v}" return the_rest client_section = builds( @@ -249,7 +249,7 @@ def server_configurations(signing_key_path): { "pass-value": # The configuration is ini so everything is always a byte string! - integers(min_value=1).map(lambda v: "{}".format(v).encode("ascii")), + integers(min_value=1).map(lambda v: f"{v}".encode("ascii")), } ), just({}), diff --git a/src/_zkapauthorizer/tests/test_client_resource.py b/src/_zkapauthorizer/tests/test_client_resource.py index e72c0b927593035fc5092bf361ad3f8029b0347f..5cedaf488b906be6bdf2ba6301ee9e745001c8ae 100644 --- a/src/_zkapauthorizer/tests/test_client_resource.py +++ b/src/_zkapauthorizer/tests/test_client_resource.py @@ -331,7 +331,7 @@ class GetTokenCountTests(TestCase): token_config = {} else: expected_count = token_count - token_config = {"default-token-count": "{}".format(expected_count)} + token_config = {"default-token-count": f"{expected_count}"} config_text = config_string_from_sections( [ @@ -567,7 +567,7 @@ class UnblindedTokenTests(TestCase): ) self.addDetail( "requesting result", - text_content("{}".format(vars(requesting.result))), + text_content(f"{vars(requesting.result)}"), ) self.assertThat( requesting, @@ -615,7 +615,7 @@ class UnblindedTokenTests(TestCase): ) self.addDetail( "requesting result", - text_content("{}".format(vars(requesting.result))), + text_content(f"{vars(requesting.result)}"), ) self.assertThat( requesting, @@ -670,7 +670,7 @@ class UnblindedTokenTests(TestCase): ) self.addDetail( "requesting result", - text_content("{}".format(vars(requesting.result))), + text_content(f"{vars(requesting.result)}"), ) self.assertThat( requesting, @@ -958,7 +958,7 @@ class VoucherTests(TestCase): ) self.addDetail( "requesting result", - text_content("{}".format(vars(requesting.result))), + text_content(f"{vars(requesting.result)}"), ) self.assertThat( requesting, @@ -990,7 +990,7 @@ class VoucherTests(TestCase): ) self.addDetail( "requesting result", - text_content("{}".format(vars(requesting.result))), + text_content(f"{vars(requesting.result)}"), ) self.assertThat( requesting,