@@ -64,7 +64,9 @@ def test___getitem___with_conditions(self):
6464 USER = "user:phred@example.com"
6565 CONDITION = {"expression" : "2 > 1" }
6666 policy = self ._make_one ("DEADBEEF" , 1 )
67- policy .bindings = [{"role" : "role/reader" , "members" : [USER ], "condition" : CONDITION }]
67+ policy .bindings = [
68+ {"role" : "role/reader" , "members" : [USER ], "condition" : CONDITION }
69+ ]
6870 with pytest .raises (InvalidOperationException , match = _DICT_ACCESS_MSG ):
6971 policy ["role/reader" ]
7072
@@ -86,9 +88,11 @@ def test___setitem___with_conditions(self):
8688 USER = "user:phred@example.com"
8789 CONDITION = {"expression" : "2 > 1" }
8890 policy = self ._make_one ("DEADBEEF" , 1 )
89- policy .bindings = [{"role" : "role/reader" , "members" : [USER ], "condition" : CONDITION }]
91+ policy .bindings = [
92+ {"role" : "role/reader" , "members" : [USER ], "condition" : CONDITION }
93+ ]
9094 with pytest .raises (InvalidOperationException , match = _DICT_ACCESS_MSG ):
91- policy [' role/reader' ] = ["user:phred@example.com" ]
95+ policy [" role/reader" ] = ["user:phred@example.com" ]
9296
9397 def test___delitem___hit (self ):
9498 policy = self ._make_one ()
@@ -111,9 +115,11 @@ def test___delitem___with_conditions(self):
111115 USER = "user:phred@example.com"
112116 CONDITION = {"expression" : "2 > 1" }
113117 policy = self ._make_one ("DEADBEEF" , 1 )
114- policy .bindings = [{"role" : "role/reader" , "members" : [USER ], "condition" : CONDITION }]
118+ policy .bindings = [
119+ {"role" : "role/reader" , "members" : [USER ], "condition" : CONDITION }
120+ ]
115121 with pytest .raises (InvalidOperationException , match = _DICT_ACCESS_MSG ):
116- del policy [' role/reader' ]
122+ del policy [" role/reader" ]
117123
118124 def test_bindings_property (self ):
119125 USER = "user:phred@example.com"
@@ -143,7 +149,7 @@ def test_owners_setter(self):
143149 with warnings .catch_warnings (record = True ) as warned :
144150 policy .owners = [MEMBER ]
145151
146- warning , = warned
152+ ( warning ,) = warned
147153 assert warning .category is DeprecationWarning
148154 assert policy [OWNER_ROLE ] == expected
149155
@@ -167,7 +173,7 @@ def test_editors_setter(self):
167173 with warnings .catch_warnings (record = True ) as warned :
168174 policy .editors = [MEMBER ]
169175
170- warning , = warned
176+ ( warning ,) = warned
171177 assert warning .category is DeprecationWarning
172178 assert policy [EDITOR_ROLE ] == expected
173179
@@ -191,7 +197,7 @@ def test_viewers_setter(self):
191197 with warnings .catch_warnings (record = True ) as warned :
192198 policy .viewers = [MEMBER ]
193199
194- warning , = warned
200+ ( warning ,) = warned
195201 assert warning .category is DeprecationWarning
196202 assert policy [VIEWER_ROLE ] == expected
197203
@@ -204,7 +210,7 @@ def test_user(self):
204210 with warnings .catch_warnings (record = True ) as warned :
205211 assert policy .user (EMAIL ) == MEMBER
206212
207- warning , = warned
213+ ( warning ,) = warned
208214 assert warning .category is DeprecationWarning
209215
210216 def test_service_account (self ):
@@ -216,7 +222,7 @@ def test_service_account(self):
216222 with warnings .catch_warnings (record = True ) as warned :
217223 assert policy .service_account (EMAIL ) == MEMBER
218224
219- warning , = warned
225+ ( warning ,) = warned
220226 assert warning .category is DeprecationWarning
221227
222228 def test_group (self ):
@@ -228,7 +234,7 @@ def test_group(self):
228234 with warnings .catch_warnings (record = True ) as warned :
229235 assert policy .group (EMAIL ) == MEMBER
230236
231- warning , = warned
237+ ( warning ,) = warned
232238 assert warning .category is DeprecationWarning
233239
234240 def test_domain (self ):
@@ -240,7 +246,7 @@ def test_domain(self):
240246 with warnings .catch_warnings (record = True ) as warned :
241247 assert policy .domain (DOMAIN ) == MEMBER
242248
243- warning , = warned
249+ ( warning ,) = warned
244250 assert warning .category is DeprecationWarning
245251
246252 def test_all_users (self ):
@@ -250,7 +256,7 @@ def test_all_users(self):
250256 with warnings .catch_warnings (record = True ) as warned :
251257 assert policy .all_users () == "allUsers"
252258
253- warning , = warned
259+ ( warning ,) = warned
254260 assert warning .category is DeprecationWarning
255261
256262 def test_authenticated_users (self ):
@@ -260,7 +266,7 @@ def test_authenticated_users(self):
260266 with warnings .catch_warnings (record = True ) as warned :
261267 assert policy .authenticated_users () == "allAuthenticatedUsers"
262268
263- warning , = warned
269+ ( warning ,) = warned
264270 assert warning .category is DeprecationWarning
265271
266272 def test_from_api_repr_only_etag (self ):
0 commit comments