Code

Opened 9 months ago

Closed 8 months ago

Last modified 7 months ago

#20739 closed Cleanup/optimization (fixed)

Remove django.test.testcases dependency on django.contrib.staticfiles

Reported by: ramiro Owned by: nobody
Component: Testing framework Version: master
Severity: Normal Keywords:
Cc: jezdez Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

As outlined in #8713 (more precisely on comment:13:ticket:8713). This is action item 3.

The LiveserverTestCase support class LiveServerThread uses the django.contrib.staticfiles.handlers.StaticFilesHandler.

Attachments (0)

Change History (6)

comment:1 Changed 9 months ago by ramiro

  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 9 months ago by ramiro

Pull request: https://github.com/django/django/pull/1354/files

Still not ready for merge.

comment:3 Changed 9 months ago by jezdez

  • Cc jezdez added

comment:4 Changed 8 months ago by ramiro

PR updated. Now it's ready for review and possible merging pending feedback. Includes tests and doc changes.

comment:5 Changed 8 months ago by Ramiro Morales <cramm0@…>

  • Resolution set to fixed
  • Status changed from new to closed

In e909ceae9b3e72b72e0a2baaa92bba9714f18cd2:

Made django.test.testcases not depend on staticfiles contrib app.

Do this by introducing a django.contrib.staticfiles.testing.StaticLiveServerCase
unittest TestCase subclass.

Fixes #20739.

comment:6 Changed 7 months ago by Ramiro Morales <cramm0@…>

In 783620ccc827057d1d0f2c6f4808350be9193bf9:

Fixed #21162 -- Better emulation of staticfiles middleware.

Code had been added in e909ceae9b. Solves test suite failures observed
on Windows.

Thanks Michael Manfre for the report. Refs #20739.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.