From 35aba9afc82560ae8479384ed271c140dd7e5ddf Mon Sep 17 00:00:00 2001 From: Alan Rominger Date: Mon, 9 Dec 2024 15:19:04 -0500 Subject: [PATCH] Fix some tests erroring with no args --- test_app/tests/conftest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test_app/tests/conftest.py b/test_app/tests/conftest.py index 6e228c30c..72764c708 100644 --- a/test_app/tests/conftest.py +++ b/test_app/tests/conftest.py @@ -37,13 +37,13 @@ def openapi_schema(): return generator.get_schema(request=drf_request) -def test_migrations_okay(apps, app_config, **kwargs): +def test_migrations_okay(apps=None, app_config=None, **kwargs): """This test is not about the code, but for verifying your own state. If you are not migrated to the correct state, this may hopefully alert you. This is targeted toward situations like switching branches. """ - if app_config.label != 'test_app': + if (not apps) or (not app_config) or app_config.label != 'test_app': return # so that it is only ran once disk_steps = defaultdict(set) app_exceptions = {'default': 'auth', 'social_auth': 'social_django'}