devtools/fake.py
branchstable
changeset 1856 b0a6e34ba11b
parent 1802 d628defebc17
child 1872 b49fdd5ce8d2
equal deleted inserted replaced
1855:4e2eeb88780f 1856:b0a6e34ba11b
    76         kwargs['https'] = False
    76         kwargs['https'] = False
    77         self._url = kwargs.pop('url', 'view?rql=Blop&vid=blop')
    77         self._url = kwargs.pop('url', 'view?rql=Blop&vid=blop')
    78         super(FakeRequest, self).__init__(*args, **kwargs)
    78         super(FakeRequest, self).__init__(*args, **kwargs)
    79         self._session_data = {}
    79         self._session_data = {}
    80         self._headers = {}
    80         self._headers = {}
       
    81 
       
    82     def get_session_data(self, key, default=None, pop=False):
       
    83         if pop:
       
    84             return self._session_data.pop(key, default)
       
    85         return self._session_data.get(key, default)
    81 
    86 
    82     def header_accept_language(self):
    87     def header_accept_language(self):
    83         """returns an ordered list of preferred languages"""
    88         """returns an ordered list of preferred languages"""
    84         return ('en',)
    89         return ('en',)
    85 
    90