lemoncurry/wellknowns/tests/views/static.py

14 lines
377 B
Python
Raw Permalink Normal View History

from ...views import static
def test_redirect_to_static(rf):
2023-08-10 02:52:37 -04:00
res = static.redirect_to_static("abcd")(rf.get("/"))
assert res.status_code == 302
2023-08-10 02:52:37 -04:00
assert res.url == "/static/wellknowns/abcd"
def test_keybase(rf):
2023-08-10 02:52:37 -04:00
res = static.keybase(rf.get("/.well-knowns/keybase.txt"))
assert res.status_code == 302
2023-08-10 02:52:37 -04:00
assert res.url == "/static/wellknowns/keybase.txt"