Hi Russ,
Thanks for your prompt reply.

I tested the solution you suggested and came up with some questions.
Here they are.

>         session =
> SessionWrapper(self.cookies.get(settings.SESSION_COOKIE_NAME, None))
>         self.assertTrue(session['key'], value)
>

First of all, I could not find a SESSION_COOKIE_NAME in settings. I
have a feeling that even though I am using a pretty recent SVN
checkout of django, I might not have the correct settings file.

Second, it would seem that the code fragment given above expects the
test class to maintain a list of cookies. Pardon my ignorance, but
should I explicitly create and maintain a list of cookies in the test
class and use them as necessary?
I am confused here, for as the test uses a test client, I thought the
cookie should probably come from the _client_.

Say something like this.

session = SessionWrapper( self.client.cookie )

Client does have a cookie attribute which is initialised to use a
django.http.SimpleCookie object.
Needless to say the above usage failed with a message which I thought
was aimed at me ;-)
" ProgrammingError: can't adapt "

Could you tell me what I am missing here/doing wrong?

Regards,
Manoj


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to