Opened 6 years ago

Closed 6 years ago

#17807 closed Bug (invalid)

LiveServerThread requires staticfiles

Reported by: joel@… 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


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):
  • 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.

Change History (1)

comment:1 Changed 6 years ago by Ramiro Morales

Resolution: invalid
Status: newclosed

But, the dependency of LiveServerTestCase on the staticfiles contrib app is documented: The first Note box reads:


LiveServerTestCase makes use of the staticfiles contrib app so you'll need to have your project configured accordingly (in particular by setting STATIC_URL).

Last edited 6 years ago by Ramiro Morales (previous) (diff)
Note: See TracTickets for help on using tickets.
Back to Top