From 4568ee3e31e0becb5f5dabfb55f0bdba09a702c7 Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Fri, 19 Jan 2024 11:24:11 -0800 Subject: [PATCH] Update auth tests --- tests/test_auth.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/test_auth.py b/tests/test_auth.py index 47d7f96..cfc2d39 100644 --- a/tests/test_auth.py +++ b/tests/test_auth.py @@ -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