@@ -1322,12 +1322,8 @@ def setup_method(self):
13221322 for flag in self .old_features :
13231323 assert flag in incompatibility_description
13241324
1325- if self .check_compatibility_flag ("unique_calendar_ids" ):
1326- self .testcal_id = "testcalendar-" + str (uuid .uuid4 ())
1327- self .testcal_id2 = "testcalendar-" + str (uuid .uuid4 ())
1328- else :
1329- self .testcal_id = "pythoncaldav-test"
1330- self .testcal_id2 = "pythoncaldav-test2"
1325+ self .testcal_id = "pythoncaldav-test"
1326+ self .testcal_id2 = "pythoncaldav-test2"
13311327
13321328 foo = self .is_supported ("rate-limit" , dict )
13331329 if foo .get ("enable" ):
@@ -1408,8 +1404,6 @@ def _cleanup(self, mode=None):
14081404 pass
14091405 else :
14101406 cal .delete ()
1411- if self .check_compatibility_flag ("unique_calendar_ids" ) and mode == "pre" :
1412- a = self ._teardownCalendar (name = "Yep" )
14131407 for calid in (self .testcal_id , self .testcal_id2 , self .testcal_id + "-tasks" ):
14141408 self ._teardownCalendar (cal_id = calid )
14151409 if self .cleanup_regime == "thorough" :
@@ -1471,10 +1465,7 @@ def _fixCalendar_(self, **kwargs):
14711465
14721466 # Pre-processing: set up defaults for name and cal_id
14731467 if "name" not in kwargs :
1474- if not self .check_compatibility_flag ("unique_calendar_ids" ) and self .cleanup_regime in (
1475- "light" ,
1476- "pre" ,
1477- ):
1468+ if self .cleanup_regime in ("light" , "pre" ):
14781469 self ._teardownCalendar (cal_id = self .testcal_id )
14791470 if not self .is_supported ("create-calendar.set-displayname" ):
14801471 kwargs ["name" ] = None
@@ -2291,10 +2282,7 @@ def testSync(self):
22912282 def testLoadEvent (self ):
22922283 self .skip_unless_support ("save-load.event" )
22932284 self .skip_unless_support ("create-calendar" )
2294- if not self .check_compatibility_flag ("unique_calendar_ids" ) and self .cleanup_regime in (
2295- "light" ,
2296- "pre" ,
2297- ):
2285+ if self .cleanup_regime in ("light" , "pre" ):
22982286 self ._teardownCalendar (cal_id = self .testcal_id )
22992287 self ._teardownCalendar (cal_id = self .testcal_id2 )
23002288 c1 = self ._fixCalendar (name = "Yep" , cal_id = self .testcal_id )
@@ -2307,20 +2295,14 @@ def testLoadEvent(self):
23072295 if not self .check_compatibility_flag ("event_by_url_is_broken" ):
23082296 assert e1 .url == e1_ .url
23092297 e1 .load ()
2310- if (
2311- not self .check_compatibility_flag ("unique_calendar_ids" )
2312- and self .cleanup_regime == "post"
2313- ):
2298+ if self .cleanup_regime == "post" :
23142299 self ._teardownCalendar (cal_id = self .testcal_id )
23152300 self ._teardownCalendar (cal_id = self .testcal_id2 )
23162301
23172302 def testCopyEvent (self ):
23182303 self .skip_unless_support ("save-load.event" )
23192304 self .skip_unless_support ("create-calendar" )
2320- if not self .check_compatibility_flag ("unique_calendar_ids" ) and self .cleanup_regime in (
2321- "light" ,
2322- "pre" ,
2323- ):
2305+ if self .cleanup_regime in ("light" , "pre" ):
23242306 self ._teardownCalendar (cal_id = self .testcal_id )
23252307 self ._teardownCalendar (cal_id = self .testcal_id2 )
23262308
@@ -2366,10 +2348,7 @@ def testCopyEvent(self):
23662348 else :
23672349 assert len (c1 .get_events ()) == 2
23682350
2369- if (
2370- not self .check_compatibility_flag ("unique_calendar_ids" )
2371- and self .cleanup_regime == "post"
2372- ):
2351+ if self .cleanup_regime == "post" :
23732352 self ._teardownCalendar (cal_id = self .testcal_id )
23742353 self ._teardownCalendar (cal_id = self .testcal_id2 )
23752354
@@ -3496,10 +3475,7 @@ def testUtf8Event(self):
34963475 # TODO: split up in creating a calendar with non-ascii name
34973476 # and an event with non-ascii description
34983477 self .skip_unless_support ("create-calendar" )
3499- if not self .check_compatibility_flag ("unique_calendar_ids" ) and self .cleanup_regime in (
3500- "light" ,
3501- "pre" ,
3502- ):
3478+ if self .cleanup_regime in ("light" , "pre" ):
35033479 self ._teardownCalendar (cal_id = self .testcal_id )
35043480
35053481 c = self ._fixCalendar (name = "Yølp" , cal_id = self .testcal_id )
@@ -3519,19 +3495,13 @@ def testUtf8Event(self):
35193495 if "zimbra" not in str (c .url ):
35203496 assert len (events ) == 1
35213497
3522- if (
3523- not self .check_compatibility_flag ("unique_calendar_ids" )
3524- and self .cleanup_regime == "post"
3525- ):
3498+ if self .cleanup_regime == "post" :
35263499 self ._teardownCalendar (cal_id = self .testcal_id )
35273500
35283501 def testUnicodeEvent (self ):
35293502 self .skip_unless_support ("save-load.event" )
35303503 self .skip_unless_support ("create-calendar" )
3531- if not self .check_compatibility_flag ("unique_calendar_ids" ) and self .cleanup_regime in (
3532- "light" ,
3533- "pre" ,
3534- ):
3504+ if self .cleanup_regime in ("light" , "pre" ):
35353505 self ._teardownCalendar (cal_id = self .testcal_id )
35363506 c = self ._fixCalendar (name = "Yølp" , cal_id = self .testcal_id )
35373507
@@ -3565,18 +3535,15 @@ def testSetCalendarProperties(self):
35653535
35663536 # Creating a new calendar with different ID but with existing name
35673537 # TODO: why do we do this?
3568- if not self .check_compatibility_flag ("unique_calendar_ids" ) and self .cleanup_regime in (
3569- "light" ,
3570- "pre" ,
3571- ):
3538+ # TODO: we're doing this all over the placee, it should be consolidated
3539+ # TODO: it should be in the test setup/teardown
3540+ if self .cleanup_regime in ("light" , "pre" ):
35723541 self ._teardownCalendar (cal_id = self .testcal_id2 )
35733542 cc = self ._fixCalendar (name = "Yep" , cal_id = self .testcal_id2 )
35743543 try :
35753544 cc .delete ()
35763545 except error .DeleteError :
3577- if not self .is_supported ("delete-calendar" ) or self .check_compatibility_flag (
3578- "unique_calendar_ids"
3579- ):
3546+ if not self .is_supported ("delete-calendar" ):
35803547 raise
35813548
35823549 c .set_properties (
0 commit comments