PLAT-1858 Better capture of deprecation warnings
This commit is contained in:
@@ -2412,7 +2412,9 @@ def auto_auth(request):
|
||||
|
||||
# Log in as the user
|
||||
if login_when_done:
|
||||
user = authenticate(username=username, password=password)
|
||||
backend = load_backend(NEW_USER_AUTH_BACKEND)
|
||||
user = backend.authenticate(request=request, username=username, password=password)
|
||||
user.backend = NEW_USER_AUTH_BACKEND
|
||||
login(request, user)
|
||||
|
||||
create_comments_service_user(user)
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
[pytest]
|
||||
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
|
||||
filterwarnings =
|
||||
default
|
||||
ignore:No request passed to the backend, unable to rate-limit.*:UserWarning
|
||||
norecursedirs = .cache
|
||||
python_classes =
|
||||
python_files = tests.py test_*.py tests_*.py *_tests.py __init__.py
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
[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
|
||||
filterwarnings =
|
||||
default
|
||||
ignore:No request passed to the backend, unable to rate-limit.*:UserWarning
|
||||
norecursedirs = .cache
|
||||
|
||||
Reference in New Issue
Block a user