summaryrefslogtreecommitdiffstats
path: root/testsuite/common.py
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/common.py')
-rw-r--r--testsuite/common.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/testsuite/common.py b/testsuite/common.py
index baf119f5b..e9c4ea339 100644
--- a/testsuite/common.py
+++ b/testsuite/common.py
@@ -298,11 +298,12 @@ class DBModelTestCase(Bcfg2TestCase):
@skipUnless(has_django, "Django not found, skipping")
def test_syncdb(self):
""" Create the test database and sync the schema """
- setup_environ(Bcfg2.settings)
- import django.core.management
- django.core.management.call_command("syncdb", interactive=False,
- verbosity=0)
- self.assertTrue(os.path.exists(Bcfg2.settings.DATABASE_NAME))
+ if self.models:
+ setup_environ(Bcfg2.settings)
+ import django.core.management
+ django.core.management.call_command("syncdb", interactive=False,
+ verbosity=0)
+ self.assertTrue(os.path.exists(Bcfg2.settings.DATABASE_NAME))
@skipUnless(has_django, "Django not found, skipping")
def test_cleandb(self):