summaryrefslogtreecommitdiff
path: root/ishtar_common/tests.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2017-02-26 18:41:22 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2017-02-26 18:41:22 +0100
commit8b77d3f69f560aac666aa2daba4edd61d062c9d0 (patch)
treea542ab58e40c133b94e3c8d0d7f6162d726a709a /ishtar_common/tests.py
parentc8aeaadac1156a679a4ec021f7b36784b9ab69c0 (diff)
downloadIshtar-8b77d3f69f560aac666aa2daba4edd61d062c9d0.tar.bz2
Ishtar-8b77d3f69f560aac666aa2daba4edd61d062c9d0.zip
Tests: add views creation to _pre_setup.
Diffstat (limited to 'ishtar_common/tests.py')
-rw-r--r--ishtar_common/tests.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/ishtar_common/tests.py b/ishtar_common/tests.py
index 9395227b2..a9e92e1f2 100644
--- a/ishtar_common/tests.py
+++ b/ishtar_common/tests.py
@@ -41,6 +41,8 @@ from ishtar_common import forms_common
from ishtar_common.utils import post_save_point
from archaeological_context_records.models import CRBulkView
+from archaeological_finds.models import BFBulkView, FBulkView, FirstBaseFindView
+
"""
from django.conf import settings
import tempfile, datetime
@@ -87,9 +89,11 @@ def create_user():
class TestCase(BaseTestCase):
def _pre_setup(self):
super(TestCase, self)._pre_setup()
- if not settings.USE_SPATIALITE_FOR_TESTS:
- c = connection.cursor()
- c.execute(CRBulkView.CREATE_SQL)
+ if settings.USE_SPATIALITE_FOR_TESTS:
+ return
+ c = connection.cursor()
+ for view in [CRBulkView, FirstBaseFindView, BFBulkView, FBulkView]:
+ c.execute(view.CREATE_SQL)
transaction.commit_unless_managed()