Check error code of PUT request
Detect errors early
This commit is contained in:
parent
5660f70753
commit
a6a3756e05
@ -263,8 +263,9 @@ class BaseRequestsMixIn:
|
||||
filters_text = "".join(
|
||||
"<C:filter>%s</C:filter>" % filter_ for filter_ in filters)
|
||||
self.request("MKCOL", "/calendar.ics/")
|
||||
self.request(
|
||||
status, _, _ = self.request(
|
||||
"PUT", "/calendar.ics/", "BEGIN:VCALENDAR\r\nEND:VCALENDAR")
|
||||
assert status == 201
|
||||
for i in range(items):
|
||||
filename = "{}{}.ics".format(kind, i + 1)
|
||||
event = get_file_content(filename)
|
||||
|
Loading…
Reference in New Issue
Block a user