diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/test_iam.py | 48 |
1 files changed, 6 insertions, 42 deletions
diff --git a/tests/unit/test_iam.py b/tests/unit/test_iam.py index e783533..fbd242e 100644 --- a/tests/unit/test_iam.py +++ b/tests/unit/test_iam.py @@ -230,72 +230,36 @@ class TestPolicy: assert policy[VIEWER_ROLE] == expected def test_user(self): - import warnings - EMAIL = "phred@example.com" MEMBER = "user:%s" % (EMAIL,) policy = self._make_one() - with warnings.catch_warnings(record=True) as warned: - assert policy.user(EMAIL) == MEMBER - - (warning,) = warned - assert warning.category is DeprecationWarning + assert policy.user(EMAIL) == MEMBER def test_service_account(self): - import warnings - EMAIL = "phred@example.com" MEMBER = "serviceAccount:%s" % (EMAIL,) policy = self._make_one() - with warnings.catch_warnings(record=True) as warned: - assert policy.service_account(EMAIL) == MEMBER - - (warning,) = warned - assert warning.category is DeprecationWarning + assert policy.service_account(EMAIL) == MEMBER def test_group(self): - import warnings - EMAIL = "phred@example.com" MEMBER = "group:%s" % (EMAIL,) policy = self._make_one() - with warnings.catch_warnings(record=True) as warned: - assert policy.group(EMAIL) == MEMBER - - (warning,) = warned - assert warning.category is DeprecationWarning + assert policy.group(EMAIL) == MEMBER def test_domain(self): - import warnings - DOMAIN = "example.com" MEMBER = "domain:%s" % (DOMAIN,) policy = self._make_one() - with warnings.catch_warnings(record=True) as warned: - assert policy.domain(DOMAIN) == MEMBER - - (warning,) = warned - assert warning.category is DeprecationWarning + assert policy.domain(DOMAIN) == MEMBER def test_all_users(self): - import warnings - policy = self._make_one() - with warnings.catch_warnings(record=True) as warned: - assert policy.all_users() == "allUsers" - - (warning,) = warned - assert warning.category is DeprecationWarning + assert policy.all_users() == "allUsers" def test_authenticated_users(self): - import warnings - policy = self._make_one() - with warnings.catch_warnings(record=True) as warned: - assert policy.authenticated_users() == "allAuthenticatedUsers" - - (warning,) = warned - assert warning.category is DeprecationWarning + assert policy.authenticated_users() == "allAuthenticatedUsers" def test_from_api_repr_only_etag(self): empty = frozenset() |