This commit is contained in:
Tom Christie 2018-11-08 13:12:46 +00:00
commit 291255b24c
1 changed files with 0 additions and 19 deletions

View File

@ -43,25 +43,6 @@ app = ExceptionMiddleware(router)
client = TestClient(app)
# def test_server_error():
# with pytest.raises(RuntimeError):
# response = client.get("/runtime_error")
#
# allow_500_client = TestClient(app, raise_server_exceptions=False)
# response = allow_500_client.get("/runtime_error")
# assert response.status_code == 500
# assert response.text == "Internal Server Error"
# def test_debug_enabled():
# app = ExceptionMiddleware(router)
# app.debug = True
# allow_500_client = TestClient(app, raise_server_exceptions=False)
# response = allow_500_client.get("/runtime_error")
# assert response.status_code == 500
# assert "RuntimeError" in response.text
def test_not_acceptable():
response = client.get("/not_acceptable")
assert response.status_code == 406