Unverified Commit 5b415b5c by Jeremy Bowman Committed by GitHub

Merge pull request #16486 from edx/jmbowman/remove_nose_cruft

Remove unused nose settings and plugin
parents f696c4c0 0f4e4e1c
...@@ -46,21 +46,6 @@ MONGO_HOST = os.environ.get('EDXAPP_TEST_MONGO_HOST', 'localhost') ...@@ -46,21 +46,6 @@ MONGO_HOST = os.environ.get('EDXAPP_TEST_MONGO_HOST', 'localhost')
THIS_UUID = uuid4().hex[:5] 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') TEST_ROOT = path('test_root')
# Want static files in the same dir for running on jenkins. # Want static files in the same dir for running on jenkins.
......
...@@ -89,21 +89,6 @@ WIKI_ENABLED = True ...@@ -89,21 +89,6 @@ WIKI_ENABLED = True
# Enable a parental consent age limit for testing # Enable a parental consent age limit for testing
PARENTAL_CONSENT_AGE_LIMIT = 13 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 # Local Directories
TEST_ROOT = path("test_root") TEST_ROOT = path("test_root")
# Want static files in the same dir for running on jenkins. # Want static files in the same dir for running on jenkins.
......
...@@ -13,14 +13,12 @@ import re ...@@ -13,14 +13,12 @@ import re
from unittest import skipUnless from unittest import skipUnless
import crum import crum
from django import db
from django.conf import settings from django.conf import settings
from django.contrib import sites from django.contrib import sites
from django.core.cache import caches from django.core.cache import caches
from django.db import DEFAULT_DB_ALIAS, connections from django.db import DEFAULT_DB_ALIAS, connections
from django.test import RequestFactory, TestCase, override_settings from django.test import RequestFactory, TestCase, override_settings
from django.test.utils import CaptureQueriesContext from django.test.utils import CaptureQueriesContext
from nose.plugins import Plugin
from request_cache.middleware import RequestCache from request_cache.middleware import RequestCache
...@@ -222,23 +220,6 @@ class FilteredQueryCountMixin(object): ...@@ -222,23 +220,6 @@ class FilteredQueryCountMixin(object):
func(*args, **kwargs) 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): def get_mock_request(user=None):
""" """
Create a request object for the user, if specified. Create a request object for the user, if specified.
......
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 to comment