Ticket #16593: proxy_model_inheritance_text_fix.v1.diff

File proxy_model_inheritance_text_fix.v1.diff, 1.1 KB (added by Jim Dalton, 13 years ago)
  • tests/modeltests/proxy_model_inheritance/tests.py

    diff --git a/tests/modeltests/proxy_model_inheritance/tests.py b/tests/modeltests/proxy_model_inheritance/tests.py
    index 546c507..813cfd2 100644
    a b class ProxyModelInheritanceTests(TransactionTestCase):  
    2222        self.old_installed_apps = settings.INSTALLED_APPS
    2323        settings.INSTALLED_APPS = ('app1', 'app2')
    2424        map(load_app, settings.INSTALLED_APPS)
    25         call_command('syncdb', verbosity=0)
    26         global ProxyModel, NiceModel
    27         from app1.models import ProxyModel
    28         from app2.models import NiceModel
    2925
    3026    def tearDown(self):
    3127        settings.INSTALLED_APPS = self.old_installed_apps
    3228        sys.path = self.old_sys_path
    3329
    3430    def test_table_exists(self):
     31        call_command('syncdb', verbosity=0)
     32        global ProxyModel, NiceModel
     33        from app1.models import ProxyModel
     34        from app2.models import NiceModel
    3535        self.assertEqual(NiceModel.objects.all().count(), 0)
    3636        self.assertEqual(ProxyModel.objects.all().count(), 0)
Back to Top