django application selenium testing no static files django application selenium testing no static files selenium selenium

django application selenium testing no static files


Instead of using LiveServerTestCase from django.test you can use StaticLiveServerTestCase from django.contrib.staticfiles.testing.

Notice not just the different class-name, but also the different module-name:

from django.test import LiveServerTestCase#     ^-- vs --vfrom django.contrib.staticfiles.testing import StaticLiveServerTestCase


Ok I found the solution. First I had to add in setting

STATIC_ROOT = 'my static dir'

then:

./manage.py collectstatic