From 73cacbd70f0d1b76c179e11f9aece4d474712960 Mon Sep 17 00:00:00 2001 From: wirthual Date: Mon, 20 Nov 2023 08:30:19 -0800 Subject: [PATCH 1/3] Update test_connection.py Try different httpstatus side since the current one seems to have trouble. --- tests/bundesanzeiger/test_connection.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/bundesanzeiger/test_connection.py b/tests/bundesanzeiger/test_connection.py index da4e470..149e36a 100644 --- a/tests/bundesanzeiger/test_connection.py +++ b/tests/bundesanzeiger/test_connection.py @@ -5,13 +5,13 @@ def test_exception_on_invalid_http_code(): ba = Bundesanzeiger() with pytest.raises(ConnectionError): - ba._Bundesanzeiger__get_response("https://httpstat.us/500") - ba._Bundesanzeiger__get_response("https://httpstat.us/503") - ba._Bundesanzeiger__get_response("https://httpstat.us/404") + ba._Bundesanzeiger__get_response("https://mock.httpstatus.io/500") + ba._Bundesanzeiger__get_response("https://mock.httpstatus.io/503") + ba._Bundesanzeiger__get_response("https://mock.httpstatus.io/404") def test_get_response(): ba = Bundesanzeiger() assert ( - ba._Bundesanzeiger__get_response("https://httpstat.us/200").status_code == 200 + ba._Bundesanzeiger__get_response("https://mock.httpstatus.io/200").status_code == 200 ) From 3bc9dad24e6b2bce3af07740fa07dd2977f546a4 Mon Sep 17 00:00:00 2001 From: wirthual Date: Mon, 20 Nov 2023 08:33:35 -0800 Subject: [PATCH 2/3] Update test_connection.py changed format --- tests/bundesanzeiger/test_connection.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/bundesanzeiger/test_connection.py b/tests/bundesanzeiger/test_connection.py index 149e36a..4dac066 100644 --- a/tests/bundesanzeiger/test_connection.py +++ b/tests/bundesanzeiger/test_connection.py @@ -12,6 +12,4 @@ def test_exception_on_invalid_http_code(): def test_get_response(): ba = Bundesanzeiger() - assert ( - ba._Bundesanzeiger__get_response("https://mock.httpstatus.io/200").status_code == 200 - ) + assert (ba._Bundesanzeiger__get_response("https://mock.httpstatus.io/200").status_code == 200) From f78c3a9c280380a1007da9abe26dee3bd8711594 Mon Sep 17 00:00:00 2001 From: wirthual Date: Mon, 20 Nov 2023 09:31:54 -0800 Subject: [PATCH 3/3] Update test_connection.py Fixed formatting --- tests/bundesanzeiger/test_connection.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/bundesanzeiger/test_connection.py b/tests/bundesanzeiger/test_connection.py index 4dac066..fd7f1e2 100644 --- a/tests/bundesanzeiger/test_connection.py +++ b/tests/bundesanzeiger/test_connection.py @@ -12,4 +12,7 @@ def test_exception_on_invalid_http_code(): def test_get_response(): ba = Bundesanzeiger() - assert (ba._Bundesanzeiger__get_response("https://mock.httpstatus.io/200").status_code == 200) + assert ( + ba._Bundesanzeiger__get_response("https://mock.httpstatus.io/200").status_code + == 200 + )