Skip to content

Commit c0f6198

Browse files
authored
Use --debug-mode for tests instead of running collectstatic (#197)
Running the tests in debug mode means WhiteNoise uses its development mode file finder, which means collectstatic doesn't need to have been run first. In CI either approach is equally valid, however, locally it's very easy to forget to run collectstatic, so we use the `--debug-mode` approach in `app.json` so users know about this trick when reading the codebase.
1 parent 27c9f9e commit c0f6198

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

app.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"description": "A barebones Python app, which can easily be deployed to Heroku.",
44
"image": "heroku/python",
55
"repository": "https://github.com/heroku/python-getting-started",
6-
"keywords": ["python", "django" ],
7-
"addons": [ "heroku-postgresql" ],
6+
"keywords": ["python", "django"],
7+
"addons": ["heroku-postgresql"],
88
"env": {
99
"SECRET_KEY": {
1010
"description": "The secret key for the Django application.",
@@ -14,8 +14,7 @@
1414
"environments": {
1515
"test": {
1616
"scripts": {
17-
"test-setup": "python manage.py collectstatic --noinput",
18-
"test": "python manage.py test"
17+
"test": "./manage.py test --debug-mode"
1918
}
2019
}
2120
}

0 commit comments

Comments
 (0)