MCPcopy
hub / github.com/django/django / test_models_py

Method test_models_py

tests/apps/tests.py:268–278  ·  view source on GitHub ↗

The models in the models.py file were loaded correctly.

(self)

Source from the content-addressed store, hash-verified

266 pass
267
268 def test_models_py(self):
269 """
270 The models in the models.py file were loaded correctly.
271 """
272 self.assertEqual(apps.get_model("apps", "TotallyNormal"), TotallyNormal)
273 with self.assertRaises(LookupError):
274 apps.get_model("apps", "SoAlternative")
275
276 with self.assertRaises(LookupError):
277 new_apps.get_model("apps", "TotallyNormal")
278 self.assertEqual(new_apps.get_model("apps", "SoAlternative"), SoAlternative)
279
280 def test_models_not_loaded(self):
281 """

Callers

nothing calls this directly

Calls 1

get_modelMethod · 0.45

Tested by

no test coverage detected