def test_get_models_specific(self): from .core.models import MockModel models = app_loading.haystack_get_models('core.MockModel') self.assertIsInstance(models, (list, GeneratorType)) self.assertListEqual(models, [MockModel])
def test_hierarchal_app_specific_model(self): models = app_loading.haystack_get_models('hierarchal_app_django.HierarchalAppModel') self.assertIsInstance(models, (list, GeneratorType)) self.assertSetEqual(set(str(i._meta) for i in models), set(('hierarchal_app_django.hierarchalappmodel', )))
def test_get_models_all(self): models = app_loading.haystack_get_models('core') self.assertIsInstance(models, (list, GeneratorType))