From 107155e09b509c73d597b57a66d4865b4e44407d Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Sun, 16 Aug 2020 20:22:15 +0100 Subject: [PATCH] support pytest-xdist 2 --- pytest_django/fixtures.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytest_django/fixtures.py b/pytest_django/fixtures.py index b2cc82580..ce8111f1e 100644 --- a/pytest_django/fixtures.py +++ b/pytest_django/fixtures.py @@ -46,7 +46,7 @@ def django_db_modify_db_settings_tox_suffix(): def django_db_modify_db_settings_xdist_suffix(request): skip_if_no_django() - xdist_suffix = getattr(request.config, "slaveinput", {}).get("slaveid") + xdist_suffix = getattr(request.config, "workerinput", {}).get("workerid") if xdist_suffix: # Put a suffix like _gw0, _gw1 etc on xdist processes _set_suffix_to_test_databases(suffix=xdist_suffix)