Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
d6dc2095
Commit
d6dc2095
authored
Nov 15, 2017
by
Jeremy Bowman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes for common/lib tests in Django 1.9+
parent
68890dab
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
10 deletions
+39
-10
common/lib/conftest.py
+0
-8
common/lib/pytest.ini
+1
-0
common/lib/xmodule/xmodule/tests/test_services.py
+2
-1
openedx/tests/settings.py
+33
-0
tox.ini
+3
-1
No files found.
common/lib/conftest.py
deleted
100644 → 0
View file @
68890dab
from
django.conf
import
settings
def
pytest_configure
():
"""
Use Django's default settings for tests in common/lib.
"""
settings
.
configure
()
common/lib/pytest.ini
View file @
d6dc2095
[pytest]
[pytest]
DJANGO_SETTINGS_MODULE
=
openedx.tests.settings
addopts
=
--nomigrations --reuse-db --durations=20
addopts
=
--nomigrations --reuse-db --durations=20
norecursedirs
=
.cache
norecursedirs
=
.cache
python_classes
=
python_classes
=
...
...
common/lib/xmodule/xmodule/tests/test_services.py
View file @
d6dc2095
...
@@ -23,7 +23,8 @@ class DummyConfig(ConfigurationModel):
...
@@ -23,7 +23,8 @@ class DummyConfig(ConfigurationModel):
"""
"""
Dummy Configuration
Dummy Configuration
"""
"""
pass
class
Meta
:
app_label
=
'xmoduletestservices'
class
DummyUnexpected
(
object
):
class
DummyUnexpected
(
object
):
...
...
openedx/tests/settings.py
0 → 100644
View file @
d6dc2095
"""
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.ini
View file @
d6dc2095
[tox]
[tox]
envlist
=
py27-django{18,111}
envlist
=
py27-django{18,1
9,110,1
11}
[testenv]
[testenv]
setenv
=
setenv
=
...
@@ -9,6 +9,8 @@ passenv =
...
@@ -9,6 +9,8 @@ passenv =
EDXAPP_TEST_MONGO_HOST
EDXAPP_TEST_MONGO_HOST
deps
=
deps
=
django18:
Django>=1.8,<1.9
django18:
Django>=1.8,<1.9
django19:
Django>=1.9,<1.10
django110:
Django>=1.10,<1.11
django111:
Django>=1.11,<2
django111:
Django>=1.11,<2
-rrequirements/edx/pre.txt
-rrequirements/edx/pre.txt
-rrequirements/edx/github.txt
-rrequirements/edx/github.txt
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment