Hello,
I'm working on some unit tests using the Client that comes with
subclassing django.test.TestCase.
When run code like this
response = self.client.get("/project/usecase")
The object response.context is a list type object containing two
identical Dictionaries. So, this errors ...
self.assertTrue(response.context.has_key('blah'),"Blah not home.")
But, this works
self.assertTrue(response.context[0].has_key('blah'),"Blah not
home.")
or this
self.assertTrue(response.context[1].has_key('blah'),"Blah not
home.")
Not sure why there are two. Any ideas?
thanks
Gene
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---