#35662: running tests now requires static files to be generated when using
ManifestStaticFilesStorage
-------------------------------------+-------------------------------------
     Reporter:  Patrick Rauscher     |                     Type:  Bug
       Status:  new                  |                Component:
                                     |  Documentation
      Version:  5.1                  |                 Severity:  Normal
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
 Hello everyone,

 while migrating from django 5.0 to 5.1, I experienced a change in behavior
 when running unittests. We are using ManifestStaticFilesStorage, and
 during development and unittesting, collectstatic have never been called,
 as static files were only required for the final result.

 This did not pose a problem in 5.0, but after switching to 5.1, tests
 using templates with static-templatetags failed with "Missing staticfiles
 manifest entry for 'admin/css/base.css'".

 Of course, there are multiple ways to fix this for a given project, such
 as
 * changing settings.py to use simple StaticFilesStorage during tests (e.g.
 detected by environment variable)
 * running collectstatic before running tests

 But, as the problem is not described in Release Notes or
 https://docs.djangoproject.com/en/5.0/topics/testing/overview/, users
 might be puzzled first.
 Not sure what the best way to deal with this issue would be, but maybe it
 could at least be added to documentation?
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35662>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/010701913199b7b1-bd4b9590-1a40-4550-8f76-fe78ecb50edb-000000%40eu-central-1.amazonses.com.

Reply via email to