Skip to content
Snippets Groups Projects
Commit d6dc2095 authored by Jeremy Bowman's avatar Jeremy Bowman
Browse files

Fixes for common/lib tests in Django 1.9+

parent 68890dab
No related merge requests found
from django.conf import settings
def pytest_configure():
"""
Use Django's default settings for tests in common/lib.
"""
settings.configure()
[pytest]
DJANGO_SETTINGS_MODULE = openedx.tests.settings
addopts = --nomigrations --reuse-db --durations=20
norecursedirs = .cache
python_classes =
......
......@@ -23,7 +23,8 @@ class DummyConfig(ConfigurationModel):
"""
Dummy Configuration
"""
pass
class Meta:
app_label = 'xmoduletestservices'
class DummyUnexpected(object):
......
"""
Minimal Django settings for tests of common/lib.
Required in Django 1.9+ due to imports of models in stock Django apps.
"""
from __future__ import absolute_import, unicode_literals
import tempfile
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'default.db',
'USER': '',
'PASSWORD': '',
'HOST': '',
'PORT': '',
}
}
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'openedx.core.djangoapps.video_config',
'edxval',
)
MEDIA_ROOT = tempfile.mkdtemp()
SECRET_KEY = 'insecure-secret-key'
USE_TZ = True
[tox]
envlist = py27-django{18,111}
envlist = py27-django{18,19,110,111}
[testenv]
setenv =
......@@ -9,6 +9,8 @@ passenv =
EDXAPP_TEST_MONGO_HOST
deps =
django18: Django>=1.8,<1.9
django19: Django>=1.9,<1.10
django110: Django>=1.10,<1.11
django111: Django>=1.11,<2
-rrequirements/edx/pre.txt
-rrequirements/edx/github.txt
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment