FAQ | This is a LIVE service | Changelog

Skip to content
Commit d8e97dc3 authored by Dr Rich Wareham's avatar Dr Rich Wareham
Browse files

fix: revert "fix(toolbar): allow running Django tests runners..."

This reverts commit 22b83193.

While well intentioned, the original fix had some issues:

- The fix was to allow running `poe manage test` but the [documented way
  to run tests][1] is via one of `poe test`, `poe tox:local` or `poe
  pytest:local` which are all tested in CI. All of those three work
  because they use _pytest_ as the test runner and `IS_RUNNING_TESTS`'s
  default value [detects this case][2].
- By hard-coding `IS_RUNNING_TESTS` to `True`, we are in fact lying for
  the other cases where `settings.developer` is used. Most notably those
  settings are used when running the application via `poe up` which is
  not when tests are being run.

The fact that the fix is not quite right has been highlighted in
[the original issue][3].

[1]: https://guidebook.devops.uis.cam.ac.uk/reference/misc/
  webapp-developer-environment/#test-suites-and-code-linting
[2]: https://django-debug-toolbar.readthedocs.io/en/latest/
  configuration.html#toolbar-options
[3]: https://gitlab.developers.cam.ac.uk/uis/devops/hr/rewards/
  rewards-webapp/-/issues/30#note_1218512
parent 5ec48be5
Loading
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment