diff --git a/openedx/core/djangoapps/course_groups/tests/test_cohorts.py b/openedx/core/djangoapps/course_groups/tests/test_cohorts.py index 37ad200f39..7445e443c4 100644 --- a/openedx/core/djangoapps/course_groups/tests/test_cohorts.py +++ b/openedx/core/djangoapps/course_groups/tests/test_cohorts.py @@ -886,7 +886,7 @@ class TestCohortsAndPartitionGroups(ModuleStoreTestCase): self.partition_id, self.group1_id, ) - with self.assertRaisesRegexp(IntegrityError, 'not unique'): + with self.assertRaises(IntegrityError): self._link_cohort_partition_group( self.first_cohort, self.partition_id,