1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-08-01 18:18:31 +00:00

Tests: Check Location header and body for redirects

This commit is contained in:
Unrud 2022-01-16 13:09:13 +01:00
parent 402bd3580e
commit e0adecf30c
2 changed files with 10 additions and 5 deletions

View file

@ -26,8 +26,9 @@ class TestBaseWebRequests(BaseTest):
"""Test web plugin."""
def test_internal(self) -> None:
_, headers, _ = self.request("GET", "/.web", check=302)
_, headers, answer = self.request("GET", "/.web", check=302)
assert headers.get("Location") == ".web/"
assert answer == "Redirected to .web/"
_, answer = self.get("/.web/")
assert answer
self.post("/.web", check=405)