kopia lustrzana https://github.com/simonw/datasette
Fixed 500 error with /favicon.ico, closes #874
rodzic
22d932fafc
commit
35aee82c60
|
|
@ -160,7 +160,7 @@ CONFIG_OPTIONS = (
|
||||||
DEFAULT_CONFIG = {option.name: option.default for option in CONFIG_OPTIONS}
|
DEFAULT_CONFIG = {option.name: option.default for option in CONFIG_OPTIONS}
|
||||||
|
|
||||||
|
|
||||||
async def favicon(scope, receive, send):
|
async def favicon(request, send):
|
||||||
await asgi_send(send, "", 200)
|
await asgi_send(send, "", 200)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -52,6 +52,12 @@ def test_http_head(app_client):
|
||||||
assert response.status == 200
|
assert response.status == 200
|
||||||
|
|
||||||
|
|
||||||
|
def test_favicon(app_client):
|
||||||
|
response = app_client.get("/favicon.ico")
|
||||||
|
assert response.status == 200
|
||||||
|
assert "" == response.text
|
||||||
|
|
||||||
|
|
||||||
def test_static(app_client):
|
def test_static(app_client):
|
||||||
response = app_client.get("/-/static/app2.css")
|
response = app_client.get("/-/static/app2.css")
|
||||||
assert response.status == 404
|
assert response.status == 404
|
||||||
|
|
|
||||||
Ładowanie…
Reference in New Issue