diff --git a/radicale/tests/test_auth.py b/radicale/tests/test_auth.py index 806dcd11..3ac3f082 100644 --- a/radicale/tests/test_auth.py +++ b/radicale/tests/test_auth.py @@ -109,6 +109,34 @@ class TestBaseAuthRequests(BaseTest): "bcrypt", "tmp:$2y$05$oD7hbiQFQlvCM7zoalo/T.MssV3VNTRI3w5KDnj8NTUKJNWfVpvRq") + def test_remote_user(self): + self.configuration.set("auth", "type", "remote_user") + self.application = Application(self.configuration, self.logger) + status, _, answer = self.request( + "PROPFIND", "/", + """ + + + + + """, REMOTE_USER="test") + assert status == 207 + assert ">/test/<" in answer + + def test_http_x_remote_user(self): + self.configuration.set("auth", "type", "http_x_remote_user") + self.application = Application(self.configuration, self.logger) + status, _, answer = self.request( + "PROPFIND", "/", + """ + + + + + """, HTTP_X_REMOTE_USER="test") + assert status == 207 + assert ">/test/<" in answer + def test_custom(self): """Custom authentication.""" self.configuration.set("auth", "type", "tests.custom.auth")