devtools/fake.py
branchstable
changeset 1856 b0a6e34ba11b
parent 1802 d628defebc17
child 1872 b49fdd5ce8d2
--- 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',)