diff options
Diffstat (limited to 'tests/proxy_model_inheritance')
| -rw-r--r-- | tests/proxy_model_inheritance/tests.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/proxy_model_inheritance/tests.py b/tests/proxy_model_inheritance/tests.py index 239bc67809..85bf74a4e9 100644 --- a/tests/proxy_model_inheritance/tests.py +++ b/tests/proxy_model_inheritance/tests.py @@ -22,6 +22,8 @@ class ProxyModelInheritanceTests(TransactionTestCase): apps and calls syncdb, then verifies that the table has been created. """ + available_apps = [] + def setUp(self): self.old_sys_path = sys.path[:] sys.path.append(os.path.dirname(os.path.abspath(upath(__file__)))) @@ -38,7 +40,11 @@ class ProxyModelInheritanceTests(TransactionTestCase): del cache.app_models['app2'] def test_table_exists(self): - call_command('syncdb', verbosity=0) + try: + cache.set_available_apps(settings.INSTALLED_APPS) + call_command('syncdb', verbosity=0) + finally: + cache.unset_available_apps() from .app1.models import ProxyModel from .app2.models import NiceModel self.assertEqual(NiceModel.objects.all().count(), 0) |
