diff --git a/common/lib/xmodule/xmodule/partitions/tests/test_partitions.py b/common/lib/xmodule/xmodule/partitions/tests/test_partitions.py index a152c1d938..cb3701df70 100644 --- a/common/lib/xmodule/xmodule/partitions/tests/test_partitions.py +++ b/common/lib/xmodule/xmodule/partitions/tests/test_partitions.py @@ -131,6 +131,9 @@ class PartitionTestCase(TestCase): extensions, namespace=USER_PARTITION_SCHEME_NAMESPACE ) + # Be sure to clean up the global scheme_extensions after the test. + self.addCleanup(self.cleanupSchemeExtensions) + # Create a test partition self.user_partition = UserPartition( self.TEST_ID, @@ -145,6 +148,9 @@ class PartitionTestCase(TestCase): self.user_partition.get_scheme(self.non_random_scheme.name) self.user_partition.get_scheme(self.random_scheme.name) + def cleanupSchemeExtensions(self): + UserPartition.scheme_extensions = None + class TestUserPartition(PartitionTestCase): """Test constructing UserPartitions"""