summaryrefslogtreecommitdiff
path: root/tests/proxy_model_inheritance
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2013-06-04 08:09:29 +0200
committerAymeric Augustin <aymeric.augustin@m4x.org>2013-06-10 11:30:01 +0200
commitc6e6d4eeb776c473567362405cdbc6a0328eb194 (patch)
treec55be28ca7d228717c286d6b14cd27fda89a1d9a /tests/proxy_model_inheritance
parent4daf570b98cc840e1a154f3876bc7463924cb9ae (diff)
Defined available_apps in relevant tests.
Fixed #20483.
Diffstat (limited to 'tests/proxy_model_inheritance')
-rw-r--r--tests/proxy_model_inheritance/tests.py8
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)