mirror of
https://github.com/Kozea/Radicale.git
synced 2025-06-26 16:45:52 +00:00
Test deletion of root collection
This commit is contained in:
parent
f4eb143ba8
commit
bfb7aec7be
1 changed files with 14 additions and 0 deletions
|
@ -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>/</" in answer
|
||||
status, headers, answer = self.request("GET", "/calendar.ics/")
|
||||
assert status == 404
|
||||
status, headers, answer = self.request("GET", "/event1.ics")
|
||||
assert status == 404
|
||||
|
||||
def test_multiple_events_with_same_uid(self):
|
||||
"""Add two events with the same UID."""
|
||||
self.request("MKCOL", "/calendar.ics/")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue