more faking stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 19 May 2009 10:04:15 +0200
branchstable
changeset 1856 b0a6e34ba11b
parent 1855 4e2eeb88780f
child 1857 46f975203f4f
more faking
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',)