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
5b415b5c
Unverified
Commit
5b415b5c
authored
Nov 07, 2017
by
Jeremy Bowman
Committed by
GitHub
Nov 07, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #16486 from edx/jmbowman/remove_nose_cruft
Remove unused nose settings and plugin
parents
f696c4c0
0f4e4e1c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
49 deletions
+0
-49
cms/envs/test.py
+0
-15
lms/envs/test.py
+0
-15
openedx/core/djangolib/testing/utils.py
+0
-19
No files found.
cms/envs/test.py
View file @
5b415b5c
...
...
@@ -46,21 +46,6 @@ MONGO_HOST = os.environ.get('EDXAPP_TEST_MONGO_HOST', 'localhost')
THIS_UUID
=
uuid4
()
.
hex
[:
5
]
_SYSTEM
=
'cms'
_REPORT_DIR
=
REPO_ROOT
/
'reports'
/
_SYSTEM
_REPORT_DIR
.
makedirs_p
()
_NOSEID_DIR
=
REPO_ROOT
/
'.testids'
/
_SYSTEM
_NOSEID_DIR
.
makedirs_p
()
NOSE_ARGS
=
[
'--id-file'
,
_NOSEID_DIR
/
'noseids'
,
]
NOSE_PLUGINS
=
[
'openedx.core.djangolib.testing.utils.NoseDatabaseIsolation'
]
TEST_ROOT
=
path
(
'test_root'
)
# Want static files in the same dir for running on jenkins.
...
...
lms/envs/test.py
View file @
5b415b5c
...
...
@@ -89,21 +89,6 @@ WIKI_ENABLED = True
# Enable a parental consent age limit for testing
PARENTAL_CONSENT_AGE_LIMIT
=
13
_SYSTEM
=
'lms'
_REPORT_DIR
=
REPO_ROOT
/
'reports'
/
_SYSTEM
_REPORT_DIR
.
makedirs_p
()
_NOSEID_DIR
=
REPO_ROOT
/
'.testids'
/
_SYSTEM
_NOSEID_DIR
.
makedirs_p
()
NOSE_ARGS
=
[
'--id-file'
,
_NOSEID_DIR
/
'noseids'
,
]
NOSE_PLUGINS
=
[
'openedx.core.djangolib.testing.utils.NoseDatabaseIsolation'
]
# Local Directories
TEST_ROOT
=
path
(
"test_root"
)
# Want static files in the same dir for running on jenkins.
...
...
openedx/core/djangolib/testing/utils.py
View file @
5b415b5c
...
...
@@ -13,14 +13,12 @@ import re
from
unittest
import
skipUnless
import
crum
from
django
import
db
from
django.conf
import
settings
from
django.contrib
import
sites
from
django.core.cache
import
caches
from
django.db
import
DEFAULT_DB_ALIAS
,
connections
from
django.test
import
RequestFactory
,
TestCase
,
override_settings
from
django.test.utils
import
CaptureQueriesContext
from
nose.plugins
import
Plugin
from
request_cache.middleware
import
RequestCache
...
...
@@ -222,23 +220,6 @@ class FilteredQueryCountMixin(object):
func
(
*
args
,
**
kwargs
)
class
NoseDatabaseIsolation
(
Plugin
):
"""
nosetest plugin that resets django databases before any tests begin.
Used to make sure that tests running in multi processes aren't sharing
a database connection.
"""
name
=
"database-isolation"
def
begin
(
self
):
"""
Before any tests start, reset all django database connections.
"""
for
db_
in
db
.
connections
.
all
():
db_
.
close
()
def
get_mock_request
(
user
=
None
):
"""
Create a request object for the user, if specified.
...
...
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