The client object of the django testing framework makes possible to touch the session. Look at http://docs.djangoproject.com/en/dev/topics/testing/?from=olddocs#django.test.client.Client.session for details
Be careful : To modify the session and then save it, it must be stored in a variable first (because a new SessionStore is created every time this property is accessed)
I think something like this below should work
s = self.client.session
s.update({
"expire_date": '2010-12-05',
"session_key": 'my_session_key',
})
s.save()
response = self.client.get('/myview/')