Re: Minor feature: Make TestCase pass the testcase instance to self.client's constructor

2013-01-06 Thread Michael Hudson-Doyle
On 5 January 2013 05:23, Malcolm Box wrote: > > The general pattern I want to implement is have a test client that makes > assertions about all the requests made during a set of tests. For example, it > could check that every get() returned cache headers, or that

Re: Minor feature: Make TestCase pass the testcase instance to self.client's constructor

2013-01-05 Thread Shai Berger
Hi again Malcolm, I think making assertions in the test client is wrong for most situations, though I can't (of course) say much about your specific case; so I'm -1 on adding the testcase as a client initializer argument (this would send the message that such things are encouraged). However,

Re: Minor feature: Make TestCase pass the testcase instance to self.client's constructor

2013-01-05 Thread Malcolm Box
On Sat, Jan 5, 2013 at 9:11 AM, Shai Berger wrote: > On Friday 04 January 2013, Malcolm Box wrote: > > > > The general pattern I want to implement is have a test client that makes > > assertions about all the requests made during a set of tests. For > example, > > it could

Re: Minor feature: Make TestCase pass the testcase instance to self.client's constructor

2013-01-05 Thread Shai Berger
On Friday 04 January 2013, Malcolm Box wrote: > > The general pattern I want to implement is have a test client that makes > assertions about all the requests made during a set of tests. For example, > it could check that every get() returned cache headers, or that > content_type is always

Re: Minor feature: Make TestCase pass the testcase instance to self.client's constructor

2013-01-04 Thread Malcolm Box
On Wednesday, January 2, 2013 11:58:04 PM UTC, Russell Keith-Magee wrote: > > On Thu, Jan 3, 2013 at 1:56 AM, Malcolm Box > wrote: > >> Hi, >> >> When creating self.client in TestCase, it would be very useful if the >> testcase instance was passed to the client. >> >> I'm

Re: Minor feature: Make TestCase pass the testcase instance to self.client's constructor

2013-01-02 Thread Russell Keith-Magee
On Thu, Jan 3, 2013 at 1:56 AM, Malcolm Box wrote: > Hi, > > When creating self.client in TestCase, it would be very useful if the > testcase instance was passed to the client. > > I'm using a replacement client class that does various validation checks, > so wants to use

Minor feature: Make TestCase pass the testcase instance to self.client's constructor

2013-01-02 Thread Malcolm Box
Hi, When creating self.client in TestCase, it would be very useful if the testcase instance was passed to the client. I'm using a replacement client class that does various validation checks, so wants to use assert* functions on TestCase, thus takes a testcase instance as a parameter at