Opened 2 years ago

Closed 2 years ago

Last modified 11 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.

Change History (8)

comment:1 Changed 2 years ago by ramiro

  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 2 years ago by ramiro

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

Still not ready for merge.

comment:3 Changed 2 years ago by jezdez

  • Cc jezdez added

comment:4 Changed 2 years ago by ramiro

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

comment:5 Changed 2 years 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 22 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.

comment:7 Changed 11 months ago by Claude Paroz <claude@…>

In 3a44e20005e654affea89af49d82532d4d55e4a7:

Fixed #23374 -- Renamed StaticLiveServerCase to StaticLiveServerTestCase

Refs #20739. Thanks Raphaël Hertzog for the report and the initial
patch.

comment:8 Changed 11 months ago by Claude Paroz <claude@…>

In 9ac713645bb870c45d7aaf16b003e392f62d4ea3:

[1.7.x] Fixed #23374 -- Renamed StaticLiveServerCase to StaticLiveServerTestCase

Refs #20739. Thanks Raphaël Hertzog for the report and the initial
patch.
Backport of 3a44e2000 from master.

Note: See TracTickets for help on using tickets.
Back to Top