summaryrefslogtreecommitdiff
path: root/tests/app_loading
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2022-02-08 12:27:04 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2022-02-08 19:25:02 +0100
commit3278c31fa59b41d03aea167f4cf85f4ddf7f848d (patch)
tree0c80b4868391296335580242c8e65052a4f62a6b /tests/app_loading
parent6a682b38e75d4c975b4c4493565a59f1bc14397c (diff)
[4.0.x] Refs #33476 -- Refactored code to strictly match 88 characters line length.
Backport of 7119f40c9881666b6f9b5cf7df09ee1d21cc8344 from main.
Diffstat (limited to 'tests/app_loading')
-rw-r--r--tests/app_loading/tests.py20
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"):