Test deletion of root collection
This commit is contained in:
parent
f4eb143ba8
commit
bfb7aec7be
@ -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…
Reference in New Issue
Block a user