From 9d2743d797d7d5500a227f5dc85cffee6bb88f53 Mon Sep 17 00:00:00 2001 From: Unrud Date: Thu, 1 Sep 2016 06:15:31 +0200 Subject: [PATCH 1/2] Test authorization --- radicale/tests/test_base.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/radicale/tests/test_base.py b/radicale/tests/test_base.py index 8b367a2..fea755e 100644 --- a/radicale/tests/test_base.py +++ b/radicale/tests/test_base.py @@ -19,6 +19,7 @@ Radicale tests with simple requests. """ +import base64 import logging import os import posixpath @@ -733,6 +734,20 @@ class BaseRequestsMixIn: assert "href>/calendar.ics/journal1.ics/calendar.ics/journal2.ics + + + + + """, + HTTP_AUTHORIZATION=authorization) + assert status == 207 + assert "href>/user/<" in answer + def test_principal_collection_creation(self): """Verify existence of the principal collection.""" status, headers, answer = self.request( From 3df367aad214158e3cf6361fd6457fac3b717e40 Mon Sep 17 00:00:00 2001 From: Unrud Date: Thu, 1 Sep 2016 06:17:18 +0200 Subject: [PATCH 2/2] Test REPORT on item Test for 90e4655a44ef801211da18ebb5bf57d75b7cd498 --- radicale/tests/test_base.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/radicale/tests/test_base.py b/radicale/tests/test_base.py index fea755e..f7d2e81 100644 --- a/radicale/tests/test_base.py +++ b/radicale/tests/test_base.py @@ -734,6 +734,24 @@ class BaseRequestsMixIn: assert "href>/calendar.ics/journal1.ics/calendar.ics/journal2.ics + + + + + """) + assert status == 207 + assert "href>%s<" % event_path in answer + def test_authorization(self): authorization = "Basic " + base64.b64encode(b"user:").decode() status, headers, answer = self.request(