From cd5452b5c0b13c542a80f1ef8590df9a46e3c1c3 Mon Sep 17 00:00:00 2001 From: Jean-Paul Calderone <exarkun@twistedmatrix.com> Date: Fri, 12 Nov 2021 07:34:59 -0500 Subject: [PATCH] black --- src/_zkapauthorizer/tests/foolscap.py | 1 + src/_zkapauthorizer/tests/test_storage_protocol.py | 13 +++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/_zkapauthorizer/tests/foolscap.py b/src/_zkapauthorizer/tests/foolscap.py index 52b745a..9cef79e 100644 --- a/src/_zkapauthorizer/tests/foolscap.py +++ b/src/_zkapauthorizer/tests/foolscap.py @@ -43,6 +43,7 @@ class StubStorageServer(object): def set_implicit_slot_lease_renewal(self, enabled): pass + def get_anonymous_storage_server(): return StubStorageServer() diff --git a/src/_zkapauthorizer/tests/test_storage_protocol.py b/src/_zkapauthorizer/tests/test_storage_protocol.py index 74b3cad..32e7e40 100644 --- a/src/_zkapauthorizer/tests/test_storage_protocol.py +++ b/src/_zkapauthorizer/tests/test_storage_protocol.py @@ -466,10 +466,15 @@ class ShareTests(TestCase): expected_leases = {} # Chop off the non-integer part of the expected values because share # files only keep integer precision. - expected_leases.update({sharenum: [int(when)] for sharenum in existing_sharenums}) - expected_leases.update({ - sharenum: [int(when + interval)] for sharenum in all_sharenums - existing_sharenums - }) + expected_leases.update( + {sharenum: [int(when)] for sharenum in existing_sharenums} + ) + expected_leases.update( + { + sharenum: [int(when + interval)] + for sharenum in all_sharenums - existing_sharenums + } + ) self.assertThat( dict(get_lease_grant_times(self.anonymous_storage_server, storage_index)), -- GitLab