mirror of
https://github.com/Kozea/Radicale.git
synced 2025-06-26 16:45:52 +00:00
Test creation of whole address book
This commit is contained in:
parent
70043c07b9
commit
02575580c6
2 changed files with 22 additions and 0 deletions
|
@ -180,6 +180,16 @@ class BaseRequestsMixIn:
|
|||
assert "\r\nUID:event\r\n" in answer and "\r\nUID:todo\r\n" in answer
|
||||
assert "\r\nUID:event1\r\n" not in answer
|
||||
|
||||
def test_put_whole_addressbook(self):
|
||||
"""Create and overwrite a whole addressbook."""
|
||||
contacts = get_file_content("contact_multiple.vcf")
|
||||
status, _, _ = self.request("PUT", "/contacts.vcf/", contacts)
|
||||
assert status == 201
|
||||
status, _, answer = self.request("GET", "/contacts.vcf/")
|
||||
assert status == 200
|
||||
assert ("\r\nUID:contact1\r\n" in answer and
|
||||
"\r\nUID:contact2\r\n" in answer)
|
||||
|
||||
def test_delete(self):
|
||||
"""Delete an event."""
|
||||
self.request("MKCOL", "/calendar.ics/")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue