mirror of
https://github.com/Kozea/Radicale.git
synced 2025-06-26 16:45:52 +00:00
Add test for deletion of collection
This commit is contained in:
parent
0f6e98a512
commit
9dd241a54b
1 changed files with 11 additions and 0 deletions
|
@ -163,6 +163,17 @@ class BaseRequests:
|
||||||
assert status == 200
|
assert status == 200
|
||||||
assert "DAV" in headers
|
assert "DAV" in headers
|
||||||
|
|
||||||
|
def test_delete_collection(self):
|
||||||
|
"""Delete a collection."""
|
||||||
|
self.request("MKCOL", "/calendar.ics/")
|
||||||
|
event = get_file_content("event1.ics")
|
||||||
|
self.request("PUT", "/calendar.ics/event1.ics", event)
|
||||||
|
status, headers, answer = self.request("DELETE", "/calendar.ics/")
|
||||||
|
assert status == 200
|
||||||
|
assert "href>/calendar.ics/</" in answer
|
||||||
|
status, headers, answer = self.request("GET", "/calendar.ics/")
|
||||||
|
assert status == 404
|
||||||
|
|
||||||
def test_multiple_events_with_same_uid(self):
|
def test_multiple_events_with_same_uid(self):
|
||||||
"""Add two events with the same UID."""
|
"""Add two events with the same UID."""
|
||||||
self.request("MKCOL", "/calendar.ics/")
|
self.request("MKCOL", "/calendar.ics/")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue