You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

testing.py 463B

12345678910111213
  1. from django.contrib.staticfiles.handlers import StaticFilesHandler
  2. from django.test import LiveServerTestCase
  3. class StaticLiveServerTestCase(LiveServerTestCase):
  4. """
  5. Extend django.test.LiveServerTestCase to transparently overlay at test
  6. execution-time the assets provided by the staticfiles app finders. This
  7. means you don't need to run collectstatic before or as a part of your tests
  8. setup.
  9. """
  10. static_handler = StaticFilesHandler