Skip to content

Instantly share code, notes, and snippets.

@wrboyce
Created February 3, 2015 13:37
Show Gist options
  • Save wrboyce/7fd48e7beebc30867be5 to your computer and use it in GitHub Desktop.
Save wrboyce/7fd48e7beebc30867be5 to your computer and use it in GitHub Desktop.
ipdb> self.client.session.items()
[('_auth_user_id', 74L), ('_auth_user_backend', 'farmforce.ffauth.backends.APIAuthenticationBackend')]
ipdb> self.client.session.update({'admin_mode': True})
ipdb> self.client.session.items()
[('_auth_user_id', 74L), ('_auth_user_backend', 'farmforce.ffauth.backends.APIAuthenticationBackend')]
ipdb> self.client.session['admin_mode'] = True
ipdb> self.client.session.items()
[('_auth_user_id', 74L), ('_auth_user_backend', 'farmforce.ffauth.backends.APIAuthenticationBackend')]

https://github.com/django/django/blob/master/django/test/client.py#L410

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment