summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Brox <tobias@redpill-linpro.com>2022-01-07 21:47:50 +0100
committerTobias Brox <tobias@redpill-linpro.com>2022-01-07 22:31:56 +0100
commit2e9262de5f9e4c42926669b0f3e1b849d6829b1a (patch)
treebeea86950bed1a0d1c7d32999ac1fd10105ac4e2
parent92888f3ebee4d23f9fea9c656c2f5924363a8f94 (diff)
downloadpython-caldav-2e9262de5f9e4c42926669b0f3e1b849d6829b1a.zip
make sure to remove the test calendars properly when doing testing
-rw-r--r--tests/test_caldav.py18
1 files changed, 5 insertions, 13 deletions
diff --git a/tests/test_caldav.py b/tests/test_caldav.py
index 797963b..5bfaf28 100644
--- a/tests/test_caldav.py
+++ b/tests/test_caldav.py
@@ -371,7 +371,6 @@ class TestScheduling(object):
assert(new_inbox_items[0].is_invite_request())
## Approving the invite
- import pdb; pdb.set_trace()
new_inbox_items[0].accept_invite(calendar=attendee_calendar)
## (now, this item should probably appear on a calendar somewhere ...
## TODO: make asserts on that)
@@ -477,19 +476,12 @@ class RepeatedFunctionalTestsBaseClass(object):
except:
logging.error("Something went kaboom while deleting event", exc_info=True)
return
- for combo in (('Yep', self.testcal_id),
- ('Yep', self.testcal_id2),
- ('Yapp', self.testcal_id2),
- ('Yølp', self.testcal_id),
- ('Yep', 'Yep'),
- ('Yølp', 'Yølp'),
- ('Yep', None),
- ('Yapp', None),
- ('Yølp', None)):
+ for name in ('Yep', 'Yapp', 'Yølp', self.testcal_id, self.testcal_id2):
+ try:
+ cal = self.principal.calendar(name=name)
+ except:
+ cal = self.principal.calendar(cal_id=name)
try:
- ## TODO: why do we need a name here? id is supposed to be unique, isn't it?
- cal = self.principal.calendar(name=combo[0],
- cal_id=combo[1])
if self.check_compatibility_flag('sticky_events'):
try:
for goo in cal.objects():