Opened 13 years ago
Closed 13 years ago
#17807 closed Bug (invalid)
LiveServerThread requires staticfiles
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Testing framework | Version: | 1.4-alpha-1 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I've found a bug in LiveServerThread (added as part of #2879). To reproduce:
- Have a Django app with staticfiles disabled, and no STATIC_URL setting
- Write a test case that uses LiveServerTestCase, such as the following:
class SomeTestCase(django.test.LiveServerTestCase): def test(self): pass
- Run the test
Instead of passing, the test fails during the SetUpClass stage. The error given is as follows:
ImproperlyConfigured: You're using the staticfiles app without having set the required STATIC_URL setting.
Note:
See TracTickets
for help on using tickets.
But, the dependency of LiveServerTestCase on the staticfiles contrib app is documented: https://docs.djangoproject.com/en/dev/topics/testing/#live-test-server The first Note box reads: