test_status_codes.py
This file
Path
tests/test_status_codes.py
18 lines · 418 bytes · Python
Last changed by
Int status codes (#92)Tom Christiebefore adoption56a7943
History of this fileTake it
Int status codes (#92)Tom Christiebefore adoption56a7943
lines 1–18why, one step back1import http3234def test_status_code_as_int():5 assert http3.codes.NOT_FOUND == 4046 assert str(http3.codes.NOT_FOUND) == "404"789def test_lowercase_status_code():10 assert http3.codes.not_found == 404111213def test_reason_phrase_for_status_code():14 assert http3.codes.get_reason_phrase(404) == "Not Found"151617def test_reason_phrase_for_unknown_status_code():18 assert http3.codes.get_reason_phrase(499) == ""