MCPcopy
hub / github.com/getsentry/sentry / assert_cannot_access

Method assert_cannot_access

src/sentry/testutils/cases.py:875–878  ·  view source on GitHub ↗
(self, user, path, method="GET", **kwargs)

Source from the content-addressed store, hash-verified

873 return resp
874
875 def assert_cannot_access(self, user, path, method="GET", **kwargs):
876 self.login_as(user, superuser=user.is_superuser)
877 resp = getattr(self.client, method.lower())(path, **kwargs)
878 assert resp.status_code >= 300
879
880 def assert_member_can_access(self, path, **kwargs):
881 return self.assert_role_can_access(path, "member", **kwargs)

Calls 1

login_asMethod · 0.80

Tested by 2