diff options
Diffstat (limited to 'ishtar_common')
| -rw-r--r-- | ishtar_common/tests.py | 13 | 
1 files changed, 12 insertions, 1 deletions
| diff --git a/ishtar_common/tests.py b/ishtar_common/tests.py index 44d7f8275..9395227b2 100644 --- a/ishtar_common/tests.py +++ b/ishtar_common/tests.py @@ -30,8 +30,9 @@ from django.core.files.base import File as DjangoFile  from django.core.files.uploadedfile import SimpleUploadedFile  from django.core.management import call_command  from django.core.urlresolvers import reverse +from django.db import connection, transaction  from django.template.defaultfilters import slugify -from django.test import TestCase +from django.test import TestCase as BaseTestCase  from django.test.client import Client  from django.test.simple import DjangoTestSuiteRunner @@ -39,6 +40,7 @@ from ishtar_common import models  from ishtar_common import forms_common  from ishtar_common.utils import post_save_point +from archaeological_context_records.models import CRBulkView  """  from django.conf import settings  import tempfile, datetime @@ -82,6 +84,15 @@ def create_user():      return username, password, 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) +            transaction.commit_unless_managed() + +  class CommandsTestCase(TestCase):      def test_clean_ishtar(self):          """ | 
