mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-02 03:41:08 +00:00
Fix unable to trigger RateLimitExceededException. (#943)
I found when authorized, the ratelimit error message is different from unauthorized. so i add this. After studying hard with my 2b colleagues @AnYeMoWang , we finally realized how tests wrote. 😸 😸 😸 😸 😸 😸 😸
This commit is contained in:
@@ -123,3 +123,12 @@ class SpecificExceptions(Framework.TestCase):
|
||||
g.get_user("jacquev6")
|
||||
|
||||
self.assertRaises(github.RateLimitExceededException, exceed)
|
||||
|
||||
def testAuthenticatedRateLimitExceeded(self):
|
||||
|
||||
def exceed():
|
||||
for i in range(100):
|
||||
res = self.g.search_code("jacquev6")
|
||||
res.get_page(0)
|
||||
|
||||
self.assertRaises(github.RateLimitExceededException, exceed)
|
||||
|
||||
Reference in New Issue
Block a user