While attempting to replace a TestCase-derived test class with the tp fixture, I hit an error with assertLoginRequired. The problem appears to be that assertLoginRequired uses assertRedirects, but that method isn't available on the TestCase class that is defined by the pytest plugin module.
I'm not sure how doable it is to pull that method out of the Django TestCase class. Another alternative would be implement an alternate version of assertRedirects if the Django version has too many hooks to other things.
While attempting to replace a
TestCase
-derived test class with thetp
fixture, I hit an error withassertLoginRequired
. The problem appears to be thatassertLoginRequired
usesassertRedirects
, but that method isn't available on theTestCase
class that is defined by the pytest plugin module.I'm not sure how doable it is to pull that method out of the Django TestCase class. Another alternative would be implement an alternate version of
assertRedirects
if the Django version has too many hooks to other things.Here's my local traceback for fuller context: