1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-09-12 20:30:57 +00:00

Tests: Simplify HTTP status check

This commit is contained in:
Unrud 2022-01-16 13:07:56 +01:00
parent 9c0b6cdaeb
commit 402bd3580e
4 changed files with 71 additions and 92 deletions

View file

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