MCPcopy
hub / github.com/django/django / test_egg1

Method test_egg1

tests/app_loading/tests.py:13–20  ·  view source on GitHub ↗

Models module can be loaded from an app in an egg

(self)

Source from the content-addressed store, hash-verified

11 self.addCleanup(apps.clear_cache)
12
13 def test_egg1(self):
14 """Models module can be loaded from an app in an egg"""
15 egg_name = "%s/modelapp.egg" % self.egg_dir
16 with extend_sys_path(egg_name):
17 with self.settings(INSTALLED_APPS=["app_with_models"]):
18 models_module = apps.get_app_config("app_with_models").models_module
19 self.assertIsNotNone(models_module)
20 del apps.all_models["app_with_models"]
21
22 def test_egg2(self):
23 """

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