diff options
author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-02-04 08:08:27 +0100 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-02-07 20:37:05 +0100 |
commit | 7119f40c9881666b6f9b5cf7df09ee1d21cc8344 (patch) | |
tree | fa50869f5614295f462d9bf77fec59365c621609 /tests/app_loading | |
parent | 9c19aff7c7561e3a82978a272ecdaad40dda5c00 (diff) | |
download | django-7119f40c9881666b6f9b5cf7df09ee1d21cc8344.tar.gz |
Refs #33476 -- Refactored code to strictly match 88 characters line length.
Diffstat (limited to 'tests/app_loading')
-rw-r--r-- | tests/app_loading/tests.py | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/tests/app_loading/tests.py b/tests/app_loading/tests.py index e28b8dce07..1499115386 100644 --- a/tests/app_loading/tests.py +++ b/tests/app_loading/tests.py @@ -22,7 +22,10 @@ class EggLoadingTest(SimpleTestCase): del apps.all_models["app_with_models"] def test_egg2(self): - """Loading an app from an egg that has no models returns no models (and no error)""" + """ + Loading an app from an egg that has no models returns no models (and no + error). + """ egg_name = "%s/nomodelapp.egg" % self.egg_dir with extend_sys_path(egg_name): with self.settings(INSTALLED_APPS=["app_no_models"]): @@ -31,7 +34,10 @@ class EggLoadingTest(SimpleTestCase): del apps.all_models["app_no_models"] def test_egg3(self): - """Models module can be loaded from an app located under an egg's top-level package""" + """ + Models module can be loaded from an app located under an egg's + top-level package. + """ egg_name = "%s/omelet.egg" % self.egg_dir with extend_sys_path(egg_name): with self.settings(INSTALLED_APPS=["omelet.app_with_models"]): @@ -40,7 +46,10 @@ class EggLoadingTest(SimpleTestCase): del apps.all_models["app_with_models"] def test_egg4(self): - """Loading an app with no models from under the top-level egg package generates no error""" + """ + Loading an app with no models from under the top-level egg package + generates no error. + """ egg_name = "%s/omelet.egg" % self.egg_dir with extend_sys_path(egg_name): with self.settings(INSTALLED_APPS=["omelet.app_no_models"]): @@ -49,7 +58,10 @@ class EggLoadingTest(SimpleTestCase): del apps.all_models["app_no_models"] def test_egg5(self): - """Loading an app from an egg that has an import error in its models module raises that error""" + """ + Loading an app from an egg that has an import error in its models + module raises that error. + """ egg_name = "%s/brokenapp.egg" % self.egg_dir with extend_sys_path(egg_name): with self.assertRaisesMessage(ImportError, "modelz"): |