From c997befd031778fcd46ffe8d79b02b04edead4dc Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Mon, 10 Dec 2018 06:45:57 +0100 Subject: [PATCH] Use request.config instead of pytest.config Will be deprecated in pytest 4.1. Ref: https://github.com/pytest-dev/pytest/commit/b88c3f8f828 --- pytest_django/fixtures.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pytest_django/fixtures.py b/pytest_django/fixtures.py index 7d3bdc66e..a37522a5c 100644 --- a/pytest_django/fixtures.py +++ b/pytest_django/fixtures.py @@ -103,14 +103,14 @@ def django_db_setup( with django_db_blocker.unblock(): db_cfg = setup_databases( - verbosity=pytest.config.option.verbose, + verbosity=request.config.option.verbose, interactive=False, **setup_databases_args ) def teardown_database(): with django_db_blocker.unblock(): - teardown_databases(db_cfg, verbosity=pytest.config.option.verbose) + teardown_databases(db_cfg, verbosity=request.config.option.verbose) if not django_db_keepdb: request.addfinalizer(teardown_database)