Skip to content

Point TEST_RUNNER at the module the runner actually lives in - #854

Merged
f213 merged 1 commit into
masterfrom
fix-test-runner-path
Aug 26, 2026
Merged

Point TEST_RUNNER at the module the runner actually lives in#854
f213 merged 1 commit into
masterfrom
fix-test-runner-path

Conversation

@f213

@f213 f213 commented Aug 26, 2026

Copy link
Copy Markdown
Member

TEST_RUNNER in {{ cookiecutter.name }}/src/app/conf/boilerplate.py pointed at app.test.disable_test_command_runner.DisableTestCommandRunner, but no app/test/ package exists — the class lives at src/app/testing/runner.py.

As a result, running ./manage.py test in a generated project died with an ImportError instead of the intended friendly CommandError: Pytest here. Run it with make test``.

The fix points the setting at app.testing.runner.DisableTestCommandRunner. The README reference to the same long-gone app.test package is updated alongside it (app.testing.api, as_user/as_anon fixtures, test_whoami.py).

🤖 Generated with Claude Code

TEST_RUNNER in boilerplate.py referenced
app.test.disable_test_command_runner.DisableTestCommandRunner, but no
app/test/ package exists — the class lives in app/testing/runner.py. In
generated projects, ./manage.py test therefore crashed with an
ImportError instead of raising the intended CommandError telling the
user to run pytest via make test.

Also update the README reference to the same long-gone app.test package:
the DRF test client is app.testing.api, its fixtures are as_user and
as_anon, and the example file is test_whoami.py.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@f213
f213 merged commit 490f06e into master Aug 26, 2026
3 checks passed
@f213
f213 deleted the fix-test-runner-path branch August 26, 2026 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant