Make the test Client class variable in TransactionTestCase
|Reported by:||Oliver Beattie||Owned by:||nobody|
|Has patch:||yes||Needs documentation:||yes|
|Needs tests:||yes||Patch needs improvement:||yes|
I have a subclass of Django's
TransactionTestCase, and I would also like to be able to specify my own subclass of
Client to use as the test's client. However, at the moment, this requires me to basically copy-and-paste all of the code out of the
__call__ method, as the
Client class is hard-coded into that function. This also makes the use of
super on the subclasses'
__call__ method impossible, as the
client instance variable would just be reset to an instance of
If it were made to be a class variable, subclasses could easily change this without having to override the
__call__ method. I've attached a diff proposal.