PLAT-1916 Ignore existing usage of deprecated field_data
This commit is contained in:
@@ -132,7 +132,6 @@ from lms.envs.common import (
|
||||
_make_locale_paths,
|
||||
)
|
||||
from path import Path as path
|
||||
from warnings import simplefilter
|
||||
|
||||
from lms.djangoapps.lms_xblock.mixin import LmsBlockMixin
|
||||
from cms.lib.xblock.authoring_mixin import AuthoringMixin
|
||||
@@ -441,11 +440,6 @@ XQUEUE_INTERFACE = {
|
||||
'basic_auth': None,
|
||||
}
|
||||
|
||||
################################# Deprecation warnings #####################
|
||||
|
||||
# Ignore deprecation warnings (so we don't clutter Jenkins builds/production)
|
||||
simplefilter('ignore')
|
||||
|
||||
################################# Middleware ###################################
|
||||
|
||||
# TODO: Remove Django 1.11 upgrade shim
|
||||
|
||||
@@ -2,10 +2,12 @@
|
||||
DJANGO_SETTINGS_MODULE = cms.envs.test
|
||||
addopts = --nomigrations --reuse-db --durations=20 -p no:randomly
|
||||
# Enable default handling for all warnings, including those that are ignored by default;
|
||||
# but hide rate-limit warnings, because we deliberately don't throttle test user logins
|
||||
# but hide rate-limit warnings (because we deliberately don't throttle test user logins)
|
||||
# and field_data deprecation warnings (because fixing them requires a major low-priority refactoring)
|
||||
filterwarnings =
|
||||
default
|
||||
ignore:No request passed to the backend, unable to rate-limit:UserWarning
|
||||
ignore::xblock.exceptions.FieldDataDeprecationWarning
|
||||
norecursedirs = envs
|
||||
python_classes =
|
||||
python_files = tests.py test_*.py *_tests.py
|
||||
|
||||
@@ -2,10 +2,12 @@
|
||||
DJANGO_SETTINGS_MODULE = openedx.tests.settings
|
||||
addopts = --nomigrations --reuse-db --durations=20
|
||||
# Enable default handling for all warnings, including those that are ignored by default;
|
||||
# but hide rate-limit warnings, because we deliberately don't throttle test user logins
|
||||
# but hide rate-limit warnings (because we deliberately don't throttle test user logins)
|
||||
# and field_data deprecation warnings (because fixing them requires a major low-priority refactoring)
|
||||
filterwarnings =
|
||||
default
|
||||
ignore:No request passed to the backend, unable to rate-limit:UserWarning
|
||||
ignore::xblock.exceptions.FieldDataDeprecationWarning
|
||||
norecursedirs = .cache
|
||||
python_classes =
|
||||
python_files = tests.py test_*.py tests_*.py *_tests.py __init__.py
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
[pytest]
|
||||
addopts = -p no:randomly --durations=20
|
||||
# Enable default handling for all warnings, including those that are ignored by default;
|
||||
# but hide rate-limit warnings, because we deliberately don't throttle test user logins
|
||||
# but hide rate-limit warnings (because we deliberately don't throttle test user logins)
|
||||
# and field_data deprecation warnings (because fixing them requires a major low-priority refactoring)
|
||||
filterwarnings =
|
||||
default
|
||||
ignore:No request passed to the backend, unable to rate-limit:UserWarning
|
||||
ignore::xblock.exceptions.FieldDataDeprecationWarning
|
||||
norecursedirs = .cache
|
||||
|
||||
@@ -35,7 +35,6 @@ import os
|
||||
|
||||
import django
|
||||
from path import Path as path
|
||||
from warnings import simplefilter
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from openedx.core.djangoapps.theming.helpers_dirs import (
|
||||
@@ -1249,11 +1248,6 @@ FOOTER_BROWSER_CACHE_MAX_AGE = 5 * 60
|
||||
# Credit api notification cache timeout
|
||||
CREDIT_NOTIFICATION_CACHE_TIMEOUT = 5 * 60 * 60
|
||||
|
||||
################################# Deprecation warnings #####################
|
||||
|
||||
# Ignore deprecation warnings (so we don't clutter Jenkins builds/production)
|
||||
simplefilter('ignore')
|
||||
|
||||
################################# Middleware ###################################
|
||||
|
||||
# TODO: Remove Django 1.11 upgrade shim
|
||||
|
||||
@@ -14,7 +14,8 @@ class CommonInitializationConfig(AppConfig):
|
||||
from . import checks
|
||||
self._add_mimetypes()
|
||||
|
||||
def _add_mimetypes(self):
|
||||
@staticmethod
|
||||
def _add_mimetypes():
|
||||
"""
|
||||
Add extra mimetypes. Used in xblock_resource.
|
||||
"""
|
||||
|
||||
@@ -115,4 +115,6 @@ def log_python_warnings():
|
||||
each test case.
|
||||
"""
|
||||
warnings.simplefilter('default')
|
||||
warnings.filterwarnings('ignore', 'Setting _field_data is deprecated')
|
||||
warnings.filterwarnings('ignore', 'Setting _field_data via the constructor is deprecated')
|
||||
logging.captureWarnings(True)
|
||||
|
||||
@@ -55,6 +55,7 @@ INSTALLED_APPS = (
|
||||
'django.contrib.auth',
|
||||
'django.contrib.contenttypes',
|
||||
'django.contrib.sessions',
|
||||
'django.contrib.sites',
|
||||
'djcelery',
|
||||
'openedx.core.djangoapps.video_config',
|
||||
'openedx.core.djangoapps.video_pipeline',
|
||||
@@ -62,6 +63,7 @@ INSTALLED_APPS = (
|
||||
'edxval',
|
||||
'courseware',
|
||||
'student',
|
||||
'openedx.core.djangoapps.site_configuration',
|
||||
'lms.djangoapps.certificates.apps.CertificatesConfig',
|
||||
'openedx.core.djangoapps.user_api',
|
||||
'course_modes.apps.CourseModesConfig',
|
||||
|
||||
@@ -18,10 +18,12 @@ process-timeout=300
|
||||
DJANGO_SETTINGS_MODULE = lms.envs.test
|
||||
addopts = --nomigrations --reuse-db --durations=20
|
||||
# Enable default handling for all warnings, including those that are ignored by default;
|
||||
# but hide rate-limit warnings, because we deliberately don't throttle test user logins
|
||||
# but hide rate-limit warnings (because we deliberately don't throttle test user logins)
|
||||
# and field_data deprecation warnings (because fixing them requires a major low-priority refactoring)
|
||||
filterwarnings =
|
||||
default
|
||||
ignore:No request passed to the backend, unable to rate-limit:UserWarning
|
||||
ignore::xblock.exceptions.FieldDataDeprecationWarning
|
||||
norecursedirs = .* *.egg build conf dist node_modules test_root cms/envs lms/envs
|
||||
python_classes =
|
||||
python_files = tests.py test_*.py tests_*.py *_tests.py __init__.py
|
||||
|
||||
Reference in New Issue
Block a user