mirror of
https://github.com/Kozea/Radicale.git
synced 2025-08-01 18:18:31 +00:00
Test PUT with whole collection
This commit is contained in:
parent
68286faa63
commit
eb15de0c5b
1 changed files with 15 additions and 0 deletions
|
@ -119,6 +119,21 @@ class BaseRequests:
|
|||
assert "DTSTART;TZID=Europe/Paris:20140901T180000" in answer
|
||||
assert "DTEND;TZID=Europe/Paris:20140901T210000" in answer
|
||||
|
||||
def test_put_whole_collection(self):
|
||||
"""Create and overwrite a whole collection."""
|
||||
event = get_file_content("event1.ics")
|
||||
status, headers, answer = self.request("PUT", "/calendar.ics/", event)
|
||||
assert status == 201
|
||||
status, headers, answer = self.request(
|
||||
"PUT", "/calendar.ics/event1.ics", event)
|
||||
assert status == 201
|
||||
# Overwrite
|
||||
status, headers, answer = self.request("PUT", "/calendar.ics/", event)
|
||||
assert status == 201
|
||||
status, headers, answer = self.request(
|
||||
"GET", "/calendar.ics/event1.ics")
|
||||
assert status == 404
|
||||
|
||||
def test_delete(self):
|
||||
"""Delete an event."""
|
||||
self.request("MKCOL", "/calendar.ics/")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue