Skip to content

Commit

Permalink
Update auth tests
Browse files Browse the repository at this point in the history
  • Loading branch information
NeonDaniel committed Jan 19, 2024
1 parent 6293603 commit 4568ee3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/test_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,13 @@ def test_validate_auth(self):
"password": "test", "expire": time()})['access_token']
self.assertFalse(self.client_manager.validate_auth(expired_token,
"127.0.0.1"))
# TODO: Test rate limited response

self.client_manager._rpm = 1
self.assertTrue(self.client_manager.validate_auth(auth_response,
"192.168.1.2"))
with self.assertRaises(HTTPException) as e:
self.client_manager.validate_auth(auth_response, "192.168.1.2")
self.assertEqual(e.exception.status_code, 429)

def test_check_refresh_request(self):
# TODO
Expand Down

0 comments on commit 4568ee3

Please sign in to comment.