From fbf447cf25468dfa7e99283ce66a9c10daacc488 Mon Sep 17 00:00:00 2001 From: Tres Seaver Date: Wed, 16 Jun 2021 13:45:41 -0400 Subject: chore: blacken (#206) Also, fix 2.7 tests broken by release of 'googleapis-common-protos 1.53.0', which dropped Python 2.7 support. Closes #169 --- tests/unit/test_iam.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'tests/unit/test_iam.py') diff --git a/tests/unit/test_iam.py b/tests/unit/test_iam.py index 0da9b23..e783533 100644 --- a/tests/unit/test_iam.py +++ b/tests/unit/test_iam.py @@ -57,6 +57,7 @@ class TestPolicy: def test__getitem___and_set(self): from google.api_core.iam import OWNER_ROLE + policy = self._make_one() # get the policy using the getter and then modify it @@ -120,7 +121,7 @@ class TestPolicy: policy = self._make_one() policy.bindings = [ {"role": "to/keep", "members": set(["phred@example.com"])}, - {"role": "to/remove", "members": set(["phred@example.com"])} + {"role": "to/remove", "members": set(["phred@example.com"])}, ] del policy["to/remove"] assert len(policy) == 1 @@ -150,7 +151,9 @@ class TestPolicy: USER = "user:phred@example.com" CONDITION = {"expression": "2 > 1"} policy = self._make_one() - BINDINGS = [{"role": "role/reader", "members": set([USER]), "condition": CONDITION}] + BINDINGS = [ + {"role": "role/reader", "members": set([USER]), "condition": CONDITION} + ] policy.bindings = BINDINGS assert policy.bindings == BINDINGS @@ -394,13 +397,17 @@ class TestPolicy: CONDITION = { "title": "title", "description": "description", - "expression": "true" + "expression": "true", } BINDINGS = [ {"role": OWNER_ROLE, "members": [OWNER1, OWNER2]}, {"role": EDITOR_ROLE, "members": [EDITOR1, EDITOR2]}, {"role": VIEWER_ROLE, "members": [VIEWER1, VIEWER2]}, - {"role": VIEWER_ROLE, "members": [VIEWER1, VIEWER2], "condition": CONDITION}, + { + "role": VIEWER_ROLE, + "members": [VIEWER1, VIEWER2], + "condition": CONDITION, + }, ] policy = self._make_one("DEADBEEF", 1) policy.bindings = BINDINGS -- cgit v1.2.3