R
R
raiboon2015-02-06 12:37:24
Django
raiboon, 2015-02-06 12:37:24

Is it possible to make django return static during a test?

./manage.py test sets debug=false and django stops serving static.
How do they live with it? Maybe you can force it to do it under the dev server?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stanislav Fateev, 2015-02-06
@raiboon

To do this, django uses StaticLiveServerTestCase

#tests.py
from django.contrib.staticfiles.testing import StaticLiveServerTestCase

class MyTests(StaticLiveServerTestCase):
     ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question