devtools/fake.py
changeset 8315 166e6d5d8e17
parent 8314 cfd6ab461849
child 8316 d5b1b75805dd
--- a/devtools/fake.py	Thu Mar 15 18:34:59 2012 +0100
+++ b/devtools/fake.py	Thu Mar 15 17:57:40 2012 +0100
@@ -61,6 +61,7 @@
         if not (args or 'vreg' in kwargs):
             kwargs['vreg'] = CWRegistryStore(FakeConfig(), initlog=False)
         kwargs['https'] = False
+        self._http_method = kwargs.pop('method', 'GET')
         self._url = kwargs.pop('url', None) or 'view?rql=Blop&vid=blop'
         super(FakeRequest, self).__init__(*args, **kwargs)
         self._session_data = {}
@@ -75,6 +76,10 @@
         """returns an ordered list of preferred languages"""
         return ('en',)
 
+    def http_method(self):
+        return self._http_method
+
+
     def header_if_modified_since(self):
         return None