2018-02-06 00:12:36 -05:00
|
|
|
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("/"))
|
2018-02-06 00:12:36 -05:00
|
|
|
assert res.status_code == 302
|
2023-08-10 02:52:37 -04:00
|
|
|
assert res.url == "/static/wellknowns/abcd"
|
2018-02-06 00:12:36 -05:00
|
|
|
|
|
|
|
|
|
|
|
def test_keybase(rf):
|
2023-08-10 02:52:37 -04:00
|
|
|
res = static.keybase(rf.get("/.well-knowns/keybase.txt"))
|
2018-02-06 00:12:36 -05:00
|
|
|
assert res.status_code == 302
|
2023-08-10 02:52:37 -04:00
|
|
|
assert res.url == "/static/wellknowns/keybase.txt"
|