1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-09-15 20:36:55 +00:00

Merge pull request #507 from Unrud/auth

Repair and test authentication
This commit is contained in:
Guillaume Ayoub 2016-09-02 18:36:32 +02:00 committed by GitHub
commit b85fc5bed6
3 changed files with 13 additions and 3 deletions

View file

@ -766,6 +766,14 @@ class BaseRequestsMixIn:
assert status == 207
assert "href>/user/<" in answer
def test_authentication(self):
"""Test if server sends authentication request."""
self.configuration.set("rights", "type", "owner_only")
self.application = Application(self.configuration, self.logger)
status, headers, answer = self.request("MKCOL", "/user/")
assert status in (401, 403)
assert headers.get("WWW-Authenticate")
def test_principal_collection_creation(self):
"""Verify existence of the principal collection."""
status, headers, answer = self.request(