Skip to content

Commit

Permalink
Update test_rest.py
Browse files Browse the repository at this point in the history
  • Loading branch information
evansims committed Aug 14, 2023
1 parent fdbd773 commit cdcaa34
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions auth0/test/management/test_rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,34 +104,34 @@ def test_default_options_are_used(self):
self.assertEqual(rc.options.telemetry, True)

def test_get_can_timeout(self):
rc = RestClient(jwt="a-token", telemetry=False, timeout=0.00001)
rc = RestClient(jwt="a-token", telemetry=False, timeout=1.0)

with self.assertRaises(requests.exceptions.Timeout):
rc.get("http://google.com")
rc.get("https://google.com")

def test_post_can_timeout(self):
rc = RestClient(jwt="a-token", telemetry=False, timeout=0.00001)
rc = RestClient(jwt="a-token", telemetry=False, timeout=1.0)

with self.assertRaises(requests.exceptions.Timeout):
rc.post("http://google.com")
rc.post("https://google.com")

def test_put_can_timeout(self):
rc = RestClient(jwt="a-token", telemetry=False, timeout=0.00001)
rc = RestClient(jwt="a-token", telemetry=False, timeout=1.0)

with self.assertRaises(requests.exceptions.Timeout):
rc.put("http://google.com")
rc.put("https://google.com")

def test_patch_can_timeout(self):
rc = RestClient(jwt="a-token", telemetry=False, timeout=0.00001)
rc = RestClient(jwt="a-token", telemetry=False, timeout=1.0)

with self.assertRaises(requests.exceptions.Timeout):
rc.patch("http://google.com")
rc.patch("https://google.com")

def test_delete_can_timeout(self):
rc = RestClient(jwt="a-token", telemetry=False, timeout=0.00001)
rc = RestClient(jwt="a-token", telemetry=False, timeout=1.0)

with self.assertRaises(requests.exceptions.Timeout):
rc.delete("http://google.com")
rc.delete("https://google.com")

@mock.patch("requests.get")
def test_get_custom_timeout(self, mock_get):
Expand Down

0 comments on commit cdcaa34

Please sign in to comment.