From c3dfd5584da82517967233e0b2acbeff17c0fa2e Mon Sep 17 00:00:00 2001 From: Peter Bieringer Date: Thu, 11 Dec 2025 08:47:49 +0100 Subject: [PATCH] add test case for max-resource-size and getctag --- radicale/tests/test_base.py | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/radicale/tests/test_base.py b/radicale/tests/test_base.py index afcca1b2..8cf05340 100644 --- a/radicale/tests/test_base.py +++ b/radicale/tests/test_base.py @@ -692,6 +692,40 @@ permissions: RrWw""") status, prop = response["ICAL:calendar-color"] assert status == 404 and not prop.text + def test_propfind_max_resource_size(self) -> None: + """Read property C:max-resource-size""" + self.mkcalendar("/calendar.ics/") + event = get_file_content("event1.ics") + self.put("/calendar.ics/event.ics", event) + _, responses = self.propfind("/calendar.ics/", """\ + + + + + + """) + response = responses["/calendar.ics/"] + assert not isinstance(response, int) + status, prop = response["C:max-resource-size"] + assert status == 200 and prop.text + + def test_propfind_getctag(self) -> None: + """Read property CS:getctag""" + self.mkcalendar("/calendar.ics/") + event = get_file_content("event1.ics") + self.put("/calendar.ics/event.ics", event) + _, responses = self.propfind("/calendar.ics/", """\ + + + + + +""") + response = responses["/calendar.ics/"] + assert not isinstance(response, int) + status, prop = response["CS:getctag"] + assert status == 200 and prop.text + def test_proppatch(self) -> None: """Set/Remove a property and read it back.""" self.mkcalendar("/calendar.ics/")