Skip to content

Commit

Permalink
Merge pull request #131 from bundesAPI/other-httpstatus-page
Browse files Browse the repository at this point in the history
Update test_connection.py
  • Loading branch information
wirthual authored Nov 21, 2023
2 parents 4081447 + f78c3a9 commit fa80dc3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/bundesanzeiger/test_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
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
)

0 comments on commit fa80dc3

Please sign in to comment.