Re: Ticket #5333: add an assertContext method to Django's TestCase

2007-09-12 Thread Gary Wilson
Russell Keith-Magee wrote: > On 9/5/07, Gary Wilson <[EMAIL PROTECTED]> wrote: >> Gary Wilson wrote: >>> Russell then added the comments: >>> - >>> My hesitation here (and the reason I didn't include a 'context assert' in >>> the >>> first place) is that assertContext does an Equals t

Re: Ticket #5333: add an assertContext method to Django's TestCase

2007-09-10 Thread Marty Alchin
On 9/10/07, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > Valid point - however, in practice, the same context is passed to > multiple templates. There are some edge cases (e.g., a view with two > calls to render_to_template) where this isn't the case, but I wouldn't > consider them to be the c

Re: Ticket #5333: add an assertContext method to Django's TestCase

2007-09-10 Thread Russell Keith-Magee
On 9/5/07, Gary Wilson <[EMAIL PROTECTED]> wrote: Apologies for taking so long to get back to you on this one, Gary - I've been snowed under with other things. > Gary Wilson wrote: > > Russell then added the comments: > > - > > My hesitation here (and the reason I didn't include a 'c

Re: Ticket #5333: add an assertContext method to Django's TestCase

2007-09-04 Thread Gary Wilson
Gary Wilson wrote: > Russell then added the comments: > - > My hesitation here (and the reason I didn't include a 'context assert' in the > first place) is that assertContext does an Equals test, but doesn't provide a > way to do any other assertion - NotEquals?, True, False, LessThan?

Ticket #5333: add an assertContext method to Django's TestCase

2007-09-04 Thread Gary Wilson
bringing discussion to the list... For testing purposes, I was thinking it would be nice to have a way to assert the value of a context variable used to render a response. So I created ticket #5333 [1], where I proposed add an assertContext method to Django's TestCase class with the following si