From f3e8f4c39569badc580e9d7696f5f6b7db9fdf49 Mon Sep 17 00:00:00 2001 From: mroloux Date: Mon, 29 Jun 2026 12:44:44 +0200 Subject: [PATCH] Update HttpClient tests to use httpbingo.org instead of httpbin.seatsio.net --- tests/testErrorHandling.py | 4 ++-- tests/testExponentialBackoff.py | 22 +++++++++++----------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/testErrorHandling.py b/tests/testErrorHandling.py index d347822..6945f1b 100644 --- a/tests/testErrorHandling.py +++ b/tests/testErrorHandling.py @@ -31,9 +31,9 @@ def test_weird_error(self): def test_timeout_raises_seatsio_exception(self): from seatsio.httpClient import HttpClient try: - client = HttpClient("https://httpbin.seatsio.net", "aSecretKey", None, 0, timeout=0.1) + client = HttpClient("https://httpbingo.org", "aSecretKey", None, 0, timeout=0.1) client.url("/delay/1").get() self.fail("expected exception") except SeatsioException as e: - assert_that(e.message).is_equal_to("Error while executing GET https://httpbin.seatsio.net/delay/1") + assert_that(e.message).is_equal_to("Error while executing GET https://httpbingo.org/delay/1") assert_that(e.cause).is_not_none() diff --git a/tests/testExponentialBackoff.py b/tests/testExponentialBackoff.py index c059b16..5595b8d 100644 --- a/tests/testExponentialBackoff.py +++ b/tests/testExponentialBackoff.py @@ -11,60 +11,60 @@ class ExponentialBackoffTest(SeatsioClientTest): def test_aborts_eventually_if_server_keeps_returning_429_get(self): start = time.time() try: - client = HttpClient("https://httpbin.seatsio.net", "aSecretKey", None, 5) + client = HttpClient("https://httpbingo.org", "aSecretKey", None, 5) client.url("/status/429").get() raise Exception("Should have failed") except RateLimitExceededException as e: - assert_that(e.message).is_equal_to("Error while executing GET https://httpbin.seatsio.net/status/429") + assert_that(e.message).is_equal_to("Error while executing GET https://httpbingo.org/status/429") wait_time = int(time.time() - start) assert_that(wait_time).is_between(10, 20) def test_aborts_eventually_if_server_keeps_returning_429_post(self): start = time.time() try: - client = HttpClient("https://httpbin.seatsio.net", "aSecretKey", None, 5) + client = HttpClient("https://httpbingo.org", "aSecretKey", None, 5) client.url("/status/429").post() raise Exception("Should have failed") except RateLimitExceededException as e: - assert_that(e.message).is_equal_to("Error while executing POST https://httpbin.seatsio.net/status/429") + assert_that(e.message).is_equal_to("Error while executing POST https://httpbingo.org/status/429") wait_time = int(time.time() - start) assert_that(wait_time).is_between(10, 20) def test_aborts_eventually_if_server_keeps_returning_429_delete(self): start = time.time() try: - client = HttpClient("https://httpbin.seatsio.net", "aSecretKey", None, 5) + client = HttpClient("https://httpbingo.org", "aSecretKey", None, 5) client.url("/status/429").delete() raise Exception("Should have failed") except RateLimitExceededException as e: - assert_that(e.message).is_equal_to("Error while executing DELETE https://httpbin.seatsio.net/status/429") + assert_that(e.message).is_equal_to("Error while executing DELETE https://httpbingo.org/status/429") wait_time = int(time.time() - start) assert_that(wait_time).is_between(10, 20) def test_aborts_directly_if_server_returns_other_error_than_429(self): start = time.time() try: - client = HttpClient("https://httpbin.seatsio.net", "aSecretKey", None, 5) + client = HttpClient("https://httpbingo.org", "aSecretKey", None, 5) client.url("/status/400").get() raise Exception("Should have failed") except SeatsioException as e: - assert_that(e.message).is_equal_to("Error while executing GET https://httpbin.seatsio.net/status/400") + assert_that(e.message).is_equal_to("Error while executing GET https://httpbingo.org/status/400") wait_time = int(time.time() - start) assert_that(wait_time).is_between(0, 5) def test_aborts_directly_if_server_returns_429_but_max_retries_0(self): start = time.time() try: - client = HttpClient("https://httpbin.seatsio.net", "aSecretKey", None, 0) + client = HttpClient("https://httpbingo.org", "aSecretKey", None, 0) client.url("/status/429").get() raise Exception("Should have failed") except RateLimitExceededException as e: - assert_that(e.message).is_equal_to("Error while executing GET https://httpbin.seatsio.net/status/429") + assert_that(e.message).is_equal_to("Error while executing GET https://httpbingo.org/status/429") wait_time = int(time.time() - start) assert_that(wait_time).is_between(0, 5) def test_returns_successfully_when_server_sends_429_and_then_successful_response(self): - client = HttpClient("https://httpbin.seatsio.net", "aSecretKey", None, 5) + client = HttpClient("https://httpbingo.org", "aSecretKey", None, 5) i = 0 while i < 20: