From 2538670ac8cc983be15a2d81494ea82f58cd839b Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Thu, 8 Aug 2013 14:03:56 -0400 Subject: testsuite: fixed base database test class --- testsuite/common.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'testsuite') 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): -- cgit v1.2.3-1-g7c22