Opened 13 years ago

Closed 13 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

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.

Change History (1)

comment:1 by Ramiro Morales, 13 years ago

Resolution: invalid
Status: newclosed

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:

Note

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 13 years ago by Ramiro Morales (previous) (diff)
Note: See TracTickets for help on using tickets.
Back to Top