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
fa6d94d1
Commit
fa6d94d1
authored
Sep 19, 2017
by
John Eskew
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove NoseTestSuiteRunner - now using pytest.
parent
2fafa546
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
0 additions
and
40 deletions
+0
-40
cms/envs/common.py
+0
-3
cms/envs/test.py
+0
-3
lms/envs/common.py
+0
-1
lms/envs/test.py
+0
-3
openedx/core/djangolib/nose.py
+0
-30
No files found.
cms/envs/common.py
View file @
fa6d94d1
...
@@ -923,9 +923,6 @@ INSTALLED_APPS = [
...
@@ -923,9 +923,6 @@ INSTALLED_APPS = [
# Monitor the status of services
# Monitor the status of services
'openedx.core.djangoapps.service_status'
,
'openedx.core.djangoapps.service_status'
,
# Testing
'django_nose'
,
# Bookmarks
# Bookmarks
'openedx.core.djangoapps.bookmarks'
,
'openedx.core.djangoapps.bookmarks'
,
...
...
cms/envs/test.py
View file @
fa6d94d1
...
@@ -45,9 +45,6 @@ MONGO_HOST = os.environ.get('EDXAPP_TEST_MONGO_HOST', 'localhost')
...
@@ -45,9 +45,6 @@ MONGO_HOST = os.environ.get('EDXAPP_TEST_MONGO_HOST', 'localhost')
THIS_UUID
=
uuid4
()
.
hex
[:
5
]
THIS_UUID
=
uuid4
()
.
hex
[:
5
]
# Nose Test Runner
TEST_RUNNER
=
'openedx.core.djangolib.nose.NoseTestSuiteRunner'
_SYSTEM
=
'cms'
_SYSTEM
=
'cms'
_REPORT_DIR
=
REPO_ROOT
/
'reports'
/
_SYSTEM
_REPORT_DIR
=
REPO_ROOT
/
'reports'
/
_SYSTEM
...
...
lms/envs/common.py
View file @
fa6d94d1
...
@@ -2090,7 +2090,6 @@ INSTALLED_APPS = [
...
@@ -2090,7 +2090,6 @@ INSTALLED_APPS = [
# For testing
# For testing
'django.contrib.admin'
,
# only used in DEBUG mode
'django.contrib.admin'
,
# only used in DEBUG mode
'django_nose'
,
'debug'
,
'debug'
,
'django_extensions'
,
'django_extensions'
,
...
...
lms/envs/test.py
View file @
fa6d94d1
...
@@ -91,9 +91,6 @@ PARENTAL_CONSENT_AGE_LIMIT = 13
...
@@ -91,9 +91,6 @@ PARENTAL_CONSENT_AGE_LIMIT = 13
# Makes the tests run much faster...
# Makes the tests run much faster...
SOUTH_TESTS_MIGRATE
=
False
# To disable migrations and use syncdb instead
SOUTH_TESTS_MIGRATE
=
False
# To disable migrations and use syncdb instead
# Nose Test Runner
TEST_RUNNER
=
'openedx.core.djangolib.nose.NoseTestSuiteRunner'
_SYSTEM
=
'lms'
_SYSTEM
=
'lms'
_REPORT_DIR
=
REPO_ROOT
/
'reports'
/
_SYSTEM
_REPORT_DIR
=
REPO_ROOT
/
'reports'
/
_SYSTEM
...
...
openedx/core/djangolib/nose.py
deleted
100644 → 0
View file @
2fafa546
"""
Utilities related to nose.
"""
import
django_nose
from
django.core.management
import
call_command
from
django.db
import
DEFAULT_DB_ALIAS
,
connections
,
transaction
class
NoseTestSuiteRunner
(
django_nose
.
NoseTestSuiteRunner
):
"""Custom NoseTestSuiteRunner."""
def
setup_databases
(
self
):
""" Setup databases and then flush to remove data added by migrations. """
return_value
=
super
(
NoseTestSuiteRunner
,
self
)
.
setup_databases
()
# Delete all data added by data migrations. Unit tests should setup their own data using factories.
call_command
(
'flush'
,
verbosity
=
0
,
interactive
=
False
,
load_initial_data
=
False
)
# Through Django 1.8, auto increment sequences are not reset when calling flush on a SQLite db.
# So we do it ourselves.
# http://sqlite.org/autoinc.html
connection
=
connections
[
DEFAULT_DB_ALIAS
]
if
connection
.
vendor
==
'sqlite'
and
not
connection
.
features
.
supports_sequence_reset
:
with
transaction
.
atomic
(
using
=
DEFAULT_DB_ALIAS
):
cursor
=
connection
.
cursor
()
cursor
.
execute
(
"delete from sqlite_sequence;"
)
return
return_value
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