Opened 4 years ago

Closed 4 years ago

Last modified 3 years ago

#16224 closed Bug (fixed)

override_settings does not work on a TestCase class

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

Description

The override_settings decorator (https://docs.djangoproject.com/en/dev/topics/testing/#django.test.utils.override_settings) does not work when decorating a TestCase class. The problem is that after decorating the TestCase class, the testrunner does not detect the class as a TestCase class anymore, so the tests within the class are not executed.

Change History (3)

comment:1 Changed 4 years ago by jezdez

  • Needs documentation unset
  • Needs tests unset
  • Owner changed from nobody to jezdez
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 4 years ago by jezdez

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

In [16377]:

Fixed #16224 -- Fixed override_settings test utility to correctly work with TestCase classes.

comment:3 Changed 3 years ago by jacob

  • milestone 1.4 deleted

Milestone 1.4 deleted

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