|
@@ -60,9 +60,9 @@ class TestClassLoading(TestCase):
|
60
|
60
|
replaced_app_idx = installed_apps.index(
|
61
|
61
|
"tests._site.apps.catalogue.apps.CatalogueConfig"
|
62
|
62
|
)
|
63
|
|
- installed_apps[
|
64
|
|
- replaced_app_idx
|
65
|
|
- ] = "tests._site.import_error_app.catalogue.apps.CatalogueConfig"
|
|
63
|
+ installed_apps[replaced_app_idx] = (
|
|
64
|
+ "tests._site.import_error_app.catalogue.apps.CatalogueConfig"
|
|
65
|
+ )
|
66
|
66
|
with override_settings(INSTALLED_APPS=installed_apps):
|
67
|
67
|
with self.assertRaises(ImportError):
|
68
|
68
|
get_class("catalogue.import_error_module", "ImportErrorClass")
|
|
@@ -74,9 +74,9 @@ class ClassLoadingWithLocalOverrideTests(TestCase):
|
74
|
74
|
replaced_app_idx = self.installed_apps.index(
|
75
|
75
|
"oscar.apps.shipping.apps.ShippingConfig"
|
76
|
76
|
)
|
77
|
|
- self.installed_apps[
|
78
|
|
- replaced_app_idx
|
79
|
|
- ] = "tests._site.apps.shipping.apps.ShippingConfig"
|
|
77
|
+ self.installed_apps[replaced_app_idx] = (
|
|
78
|
+ "tests._site.apps.shipping.apps.ShippingConfig"
|
|
79
|
+ )
|
80
|
80
|
|
81
|
81
|
def test_loading_class_defined_in_local_module(self):
|
82
|
82
|
with override_settings(INSTALLED_APPS=self.installed_apps):
|
|
@@ -133,9 +133,9 @@ class ClassLoadingWithLocalOverrideWithMultipleSegmentsTests(TestCase):
|
133
|
133
|
replaced_app_idx = self.installed_apps.index(
|
134
|
134
|
"oscar.apps.shipping.apps.ShippingConfig"
|
135
|
135
|
)
|
136
|
|
- self.installed_apps[
|
137
|
|
- replaced_app_idx
|
138
|
|
- ] = "tests._site.apps.shipping.apps.ShippingConfig"
|
|
136
|
+ self.installed_apps[replaced_app_idx] = (
|
|
137
|
+ "tests._site.apps.shipping.apps.ShippingConfig"
|
|
138
|
+ )
|
139
|
139
|
|
140
|
140
|
def test_loading_class_defined_in_local_module(self):
|
141
|
141
|
with override_settings(INSTALLED_APPS=self.installed_apps):
|