Commit 9c213040 by Bach Dániel

circle: fix selenium tests

parent 0ca074b7
......@@ -19,6 +19,26 @@ import os
from .base import * # noqa
# fix https://github.com/django-nose/django-nose/issues/197
# AttributeError: 'module' object has no attribute 'commit_unless_managed'
# TypeError: _skip_create_test_db() got an unexpected keyword argument 'keepdb'
from django.db import transaction
from django_nose import runner
def _skip_create_test_db(self, verbosity=1, autoclobber=False, serialize=True,
keepdb=True):
return old_skip_create_test_db(
self, verbosity=verbosity, autoclobber=autoclobber,
serialize=serialize)
setattr(transaction, "commit_unless_managed", lambda using: using)
old_skip_create_test_db = runner._skip_create_test_db
setattr(runner, "_skip_create_test_db", _skip_create_test_db)
os.environ['REUSE_DB'] = "1"
os.environ['DJANGO_TEST_DB_NAME'] = "circle"
DATABASES = {
......
......@@ -13,7 +13,7 @@ django-crispy-forms==1.4.0
django-model-utils==2.2
djangosaml2==0.13.0
django-sizefield==0.7
django-sshkey==2.2.0
git+https://git.ik.bme.hu/circle/django-sshkey.git
django-statici18n==1.1.3
django-tables2==0.16.0
django-taggit==0.14.0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment