2013-12-24 19:25:17 +08:00
|
|
|
from django.apps import apps
|
2013-12-15 01:51:58 +08:00
|
|
|
from django.test import TestCase
|
|
|
|
|
|
|
|
|
|
|
|
class NoModelTests(TestCase):
|
|
|
|
|
|
|
|
def test_no_models(self):
|
|
|
|
"""Test that 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)
|