summaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander.sulfrian@fu-berlin.de>2016-08-17 20:49:32 +0200
committerAlexander Sulfrian <alexander.sulfrian@fu-berlin.de>2016-08-17 21:00:28 +0200
commitd18a0595f0906204c3625fb84a0ac788755220c1 (patch)
treea947a477ec9a4a87e9928261d74dbb6f5cc5891d /testsuite
parente4350c2e2fcdf8dcf8c31ac18a0aa8cbc021f904 (diff)
downloadbcfg2-d18a0595f0906204c3625fb84a0ac788755220c1.tar.gz
bcfg2-d18a0595f0906204c3625fb84a0ac788755220c1.tar.bz2
bcfg2-d18a0595f0906204c3625fb84a0ac788755220c1.zip
testsuite: Ignore failing syncdb
Since we have migrations for Bcfg2.Server syncdb fails for every call but the first one with a ImproperlyConfigured exception because it cannot find Bcfg2.Reporting. We simply ignore this and all test are working.
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/common.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/testsuite/common.py b/testsuite/common.py
index 47e3bfb14..9db2cb94a 100644
--- a/testsuite/common.py
+++ b/testsuite/common.py
@@ -221,10 +221,14 @@ class DBModelTestCase(Bcfg2TestCase):
if self.models:
import django
import django.core.management
+ from django.core.exceptions import ImproperlyConfigured
if django.VERSION[0] == 1 and django.VERSION[1] < 7:
- django.core.management.call_command('syncdb', interactive=False,
- verbosity=0)
+ try:
+ django.core.management.call_command('syncdb', interactive=False,
+ verbosity=0)
+ except ImproperlyConfigured:
+ pass
django.core.management.call_command('migrate', interactive=False,
verbosity=0)