From bfb7aec7bedcb37aa02b3762f8f7fac809c0eeb3 Mon Sep 17 00:00:00 2001 From: Unrud Date: Tue, 2 Aug 2016 19:31:49 +0200 Subject: [PATCH] Test deletion of root collection --- radicale/tests/test_base.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/radicale/tests/test_base.py b/radicale/tests/test_base.py index 525a5da..6f763a0 100644 --- a/radicale/tests/test_base.py +++ b/radicale/tests/test_base.py @@ -174,6 +174,20 @@ class BaseRequests: status, headers, answer = self.request("GET", "/calendar.ics/") assert status == 404 + def test_delete_root_collection(self): + """Delete the root collection.""" + self.request("MKCOL", "/calendar.ics/") + event = get_file_content("event1.ics") + self.request("PUT", "/event1.ics", event) + self.request("PUT", "/calendar.ics/event1.ics", event) + status, headers, answer = self.request("DELETE", "/") + assert status == 200 + assert "href>/