def test_it_returns_the_model_if_found(self):
     from tests.models import TestPerson
     result = ModelFinder.find('tests', 'TestPerson')
     self.assertEqual(result, TestPerson)
 def test_find_raises_error_if_model_name_is_blank(self):
     with self.assertRaises(CommandError):
         ModelFinder.find('nsync', '')
 def test_it_raises_an_error_if_the_model_cannot_be_found(self):
     with self.assertRaises(LookupError):
         ModelFinder.find('fakeApp', 'missingModel')
 def test_find_raises_error_if_app_label_is_blank(self):
     with self.assertRaises(CommandError):
         ModelFinder.find('', 'model')
 def test_it_returns_the_model_if_found(self):
     from tests.models import TestPerson
     result = ModelFinder.find('tests', 'TestPerson')
     self.assertEqual(result, TestPerson)
 def test_it_raises_an_error_if_the_model_cannot_be_found(self):
     with self.assertRaises(LookupError):
         ModelFinder.find('fakeApp', 'missingModel')
 def test_find_raises_error_if_model_name_is_blank(self):
     with self.assertRaises(CommandError):
         ModelFinder.find('nsync', '')
 def test_find_raises_error_if_app_label_is_blank(self):
     with self.assertRaises(CommandError):
         ModelFinder.find('', 'model')