Add decorators for skipping tests when run without indicated Django support.
Review Request #11248 — Created Oct. 26, 2020 and submitted — Latest diff uploaded
Many unit tests can only be run if the version of Django includes
certain support. For instance, migration-related unit tests require
support for migrations in Django. Previously, every such unit test had
to have its own checks and handle raising aSkipTest
, but this was
getting tedious to maintain, and isn't very future-proof.This change adds some new decorators for these tests, and standardizes
theSkipTest
message. This simplifies much of the code and improves
maintainability going forward.
All unit tests pass across all versions of Django.
Verified that the skip message output was correct in older versions.