2013-12-24 19:25:17 +08:00
|
|
|
from django.apps import apps
|
2015-04-18 05:38:20 +08:00
|
|
|
from django.test import SimpleTestCase
|
2013-12-15 01:51:58 +08:00
|
|
|
|
|
|
|
|
2015-04-18 05:38:20 +08:00
|
|
|
class NoModelTests(SimpleTestCase):
|
2013-12-15 01:51:58 +08:00
|
|
|
|
|
|
|
def test_no_models(self):
|
2016-10-27 15:53:39 +08:00
|
|
|
"""It's possible to load an app with no models.py file."""
|
2013-12-24 19:25:17 +08:00
|
|
|
app_config = apps.get_app_config('no_models')
|
2013-12-15 01:51:58 +08:00
|
|
|
self.assertIsNone(app_config.models_module)
|