@@ -153,28 +153,6 @@ def test_request_403(self, m):
153153 with self .assertRaises (Forbidden ):
154154 self .requester .request ("GET" , "403" )
155155
156- def test_request_403_RateLimitExeeded (self , m ):
157- register_uris ({"requests" : ["403_rate_limit" ]}, m )
158-
159- with self .assertRaises (RateLimitExceeded ) as exc :
160- self .requester .request ("GET" , "403_rate_limit" )
161-
162- self .assertEqual (
163- exc .exception .message ,
164- "Rate Limit Exceeded. X-Rate-Limit-Remaining: 3.14159265359" ,
165- )
166-
167- def test_request_403_RateLimitExeeded_no_remaining_header (self , m ):
168- register_uris ({"requests" : ["403_rate_limit_no_remaining_header" ]}, m )
169-
170- with self .assertRaises (RateLimitExceeded ) as exc :
171- self .requester .request ("GET" , "403_rate_limit_no_remaining_header" )
172-
173- self .assertEqual (
174- exc .exception .message ,
175- "Rate Limit Exceeded. X-Rate-Limit-Remaining: Unknown" ,
176- )
177-
178156 def test_request_404 (self , m ):
179157 register_uris ({"requests" : ["404" ]}, m )
180158
@@ -193,6 +171,28 @@ def test_request_422(self, m):
193171 with self .assertRaises (UnprocessableEntity ):
194172 self .requester .request ("GET" , "422" )
195173
174+ def test_request_429_RateLimitExeeded (self , m ):
175+ register_uris ({"requests" : ["429_rate_limit" ]}, m )
176+
177+ with self .assertRaises (RateLimitExceeded ) as exc :
178+ self .requester .request ("GET" , "429_rate_limit" )
179+
180+ self .assertEqual (
181+ exc .exception .message ,
182+ "Rate Limit Exceeded. X-Rate-Limit-Remaining: 3.14159265359" ,
183+ )
184+
185+ def test_request_429_RateLimitExeeded_no_remaining_header (self , m ):
186+ register_uris ({"requests" : ["429_rate_limit_no_remaining_header" ]}, m )
187+
188+ with self .assertRaises (RateLimitExceeded ) as exc :
189+ self .requester .request ("GET" , "429_rate_limit_no_remaining_header" )
190+
191+ self .assertEqual (
192+ exc .exception .message ,
193+ "Rate Limit Exceeded. X-Rate-Limit-Remaining: Unknown" ,
194+ )
195+
196196 def test_request_500 (self , m ):
197197 register_uris ({"requests" : ["500" ]}, m )
198198
0 commit comments