[1.7.x] Fixed #24095 -- Prevented WarningLoggerTests from leaking a warnings filter.
[1.7.x] Fixed #24095 -- Prevented WarningLoggerTests from leaking a warnings filter.

Backport of ade985999657eaef6a9510c2aeba9b2196d7bf6e from master

oscaro/django,jyotsna1820/django,oscaro/django,jyotsna1820/django,oscaro/django,jyotsna1820/django,jyotsna1820/django,oscaro/django