summaryrefslogtreecommitdiffstats
path: root/testsuite/common.py
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2013-08-08 14:03:56 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2013-08-09 08:54:01 -0400
commit2538670ac8cc983be15a2d81494ea82f58cd839b (patch)
tree36490625bcc68a137c589c65b951a7ed840293de /testsuite/common.py
parente29a400e609f3147dc3e0e3bab1054fe275e0bbd (diff)
downloadbcfg2-2538670ac8cc983be15a2d81494ea82f58cd839b.tar.gz
bcfg2-2538670ac8cc983be15a2d81494ea82f58cd839b.tar.bz2
bcfg2-2538670ac8cc983be15a2d81494ea82f58cd839b.zip
testsuite: fixed base database test class
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):