Skip to content

Commit

Permalink
Update oauth test
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelGHSeg authored Sep 25, 2024
1 parent e045297 commit c10e43d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions segment/analytics/test/test_oauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def json(self):
elif kwargs['url'] == 'http://127.0.0.1:400/token':
return MockResponse({"reason": "test_reason", "json_data" : {"error":"unrecoverable", "error_description":"nah"}}, 400)
elif kwargs['url'] == 'http://127.0.0.1:429/token':
return MockResponse({"reason": "test_reason", "headers" : {"X-RateLimit-Reset": time.time()*1000 + 2000}}, 429)
return MockResponse({"reason": "test_reason", "headers" : {"X-RateLimit-Reset": 2000}}, 429)
elif kwargs['url'] == 'http://127.0.0.1:500/token':
return MockResponse({"reason": "test_reason", "json_data" : {"error":"recoverable", "error_description":"nah"}}, 500)
elif kwargs['url'] == 'http://127.0.0.1:501/token':
Expand Down Expand Up @@ -152,4 +152,4 @@ def test_oauth_integration_fail_bad_key(self, mock_post):
self.assertTrue(self.failed)

if __name__ == '__main__':
unittest.main()
unittest.main()

0 comments on commit c10e43d

Please sign in to comment.