MCPcopy
hub / github.com/django/django / test_egg2

Method test_egg2

tests/app_loading/tests.py:22–32  ·  view source on GitHub ↗

Loading an app from an egg that has no models returns no models (and no error).

(self)

Source from the content-addressed store, hash-verified

20 del apps.all_models["app_with_models"]
21
22 def test_egg2(self):
23 """
24 Loading an app from an egg that has no models returns no models (and no
25 error).
26 """
27 egg_name = "%s/nomodelapp.egg" % self.egg_dir
28 with extend_sys_path(egg_name):
29 with self.settings(INSTALLED_APPS=["app_no_models"]):
30 models_module = apps.get_app_config("app_no_models").models_module
31 self.assertIsNone(models_module)
32 del apps.all_models["app_no_models"]
33
34 def test_egg3(self):
35 """

Callers

nothing calls this directly

Calls 3

extend_sys_pathFunction · 0.90
get_app_configMethod · 0.80
settingsMethod · 0.45

Tested by

no test coverage detected