# HG changeset patch # User Sylvain Thénault # Date 1242720255 -7200 # Node ID b0a6e34ba11bfd86a8ee9e6b1604b8dc77909c11 # Parent 4e2eeb88780f6a25455e332296fc3bccbdd9bc77 more faking diff -r 4e2eeb88780f -r b0a6e34ba11b devtools/fake.py --- a/devtools/fake.py Tue May 19 09:06:42 2009 +0200 +++ b/devtools/fake.py Tue May 19 10:04:15 2009 +0200 @@ -79,6 +79,11 @@ self._session_data = {} self._headers = {} + def get_session_data(self, key, default=None, pop=False): + if pop: + return self._session_data.pop(key, default) + return self._session_data.get(key, default) + def header_accept_language(self): """returns an ordered list of preferred languages""" return ('en',)