mirror of
https://github.com/Kozea/Radicale.git
synced 2025-06-26 16:45:52 +00:00
add test case
This commit is contained in:
parent
a449d8774b
commit
4ef5cad20f
1 changed files with 9 additions and 0 deletions
|
@ -440,6 +440,15 @@ permissions: RrWw""")
|
||||||
assert responses["/calendar.ics/"] == 200
|
assert responses["/calendar.ics/"] == 200
|
||||||
self.get("/calendar.ics/", check=404)
|
self.get("/calendar.ics/", check=404)
|
||||||
|
|
||||||
|
def test_delete_collection_not_permitted(self) -> None:
|
||||||
|
"""Delete a collection (try if not permitted)."""
|
||||||
|
self.configure({"rights": {"permit_delete_collection": False}})
|
||||||
|
self.mkcalendar("/calendar.ics/")
|
||||||
|
event = get_file_content("event1.ics")
|
||||||
|
self.put("/calendar.ics/event1.ics", event)
|
||||||
|
_, responses = self.delete("/calendar.ics/", check=401)
|
||||||
|
self.get("/calendar.ics/", check=200)
|
||||||
|
|
||||||
def test_delete_root_collection(self) -> None:
|
def test_delete_root_collection(self) -> None:
|
||||||
"""Delete the root collection."""
|
"""Delete the root collection."""
|
||||||
self.mkcalendar("/calendar.ics/")
|
self.mkcalendar("/calendar.ics/")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue