Skip to content

Commit dcd1d6c

Browse files
authored
Sem-Ver: bugfix Switch the wsgi tests to use unittest assertions.
Signed-off-by: David Black <[email protected]>
1 parent cf31939 commit dcd1d6c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

atlassian_jwt_auth/frameworks/wsgi/tests/test_wsgi.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,19 +63,19 @@ def test_request_with_valid_token_is_allowed(self):
6363
'client-app/key01', self._private_key_pem
6464
)
6565
body, resp_info, environ = self.send_request(token=token)
66-
assert resp_info['status'] == '200 OK'
67-
assert 'ATL_ASAP_CLAIMS' in environ
66+
self.assertEqual(resp_info['status'], '200 OK')
67+
self.assertIn('ATL_ASAP_CLAIMS', environ)
6868

6969
def test_request_with_invalid_audience_is_rejected(self):
7070
token = create_token(
7171
'client-app', 'invalid-audience',
7272
'client-app/key01', self._private_key_pem
7373
)
7474
body, resp_info, environ = self.send_request(token=token)
75-
assert resp_info['status'] == '401 Unauthorized'
76-
assert 'ATL_ASAP_CLAIMS' not in environ
75+
self.assertEqual(resp_info['status'], '401 Unauthorized')
76+
self.assertNotIn('ATL_ASAP_CLAIMS', environ)
7777

7878
def test_request_with_invalid_token_is_rejected(self):
7979
body, resp_info, environ = self.send_request(token=b'notavalidtoken')
80-
assert resp_info['status'] == '401 Unauthorized'
81-
assert 'ATL_ASAP_CLAIMS' not in environ
80+
self.assertEqual(resp_info['status'], '401 Unauthorized')
81+
self.assertNotIn('ATL_ASAP_CLAIMS', environ)

0 commit comments

Comments
 (0)