Commits

Michael Merickel  committed fd2e274 Merge

resolved some weird merge conflict

  • Participants
  • Parent commits df06fbc, 69a98fd

Comments (0)

Files changed (5)

File tests/test_byterange.py

File contents unchanged.

File tests/test_cachecontrol.py

         newone = self.make_one(self.callback)
         newone['first'] = 1
         assert len(self.call_queue) == 1
-        assert self.call_queue[-1] == "Called with: {'first': 1}"
+        assert self.call_queue[-1] == "Called with: %r" % newone
 
         del newone['first']
         assert len(self.call_queue) == 2
         newone = self.make_one(self.callback)
         assert newone.setdefault('haters', 'gonna-hate') == 'gonna-hate'
         assert len(self.call_queue) == 1
-        assert self.call_queue[-1] == "Called with: {'haters': 'gonna-hate'}", self.call_queue[-1]
+        assert self.call_queue[-1] == "Called with: %r" % {'haters' : 'gonna-hate'}, self.call_queue[-1]
 
         # no effect if failobj is not set
         assert newone.setdefault('haters', 'gonna-love') == 'gonna-hate'

File tests/test_datetime_utils.py

File contents unchanged.

File tests/test_dec.py

                                                 post_dict['words']))
 
     def test_wsgify_request_method(self):
-        resp_str = 'Nice body!'
+        resp_str = b'Nice body!'
         @wsgify
         def test_app(req):
             self.assertEqual(req.method, 'PUT')
             pass
         name = _func_name(func)
         self.assertEqual(name, 'tests.test_dec.func')
-        name = _func_name('a')
-        self.assertEqual(name, "'a'")
+        class Dummy(object):
+            def __repr__(self):
+                return 'Dummy'
+        d = Dummy()
+        name = _func_name(d)
+        self.assertEqual(name, 'Dummy')
         class Klass(object):
             @classmethod
             def classmeth(cls):

File webob/request.py

     @property
     def str_POST(self):
         """
+        DEPRECATED
+        An alias for _bPOST that returns a deprecated error message.
+        """
+        warn_deprecation(
+                "str_POST is deprecated.  Please use Request.POST, which returns unicode.",
+                '1.2',
+                self._setattr_stacklevel
+            )
+        return self._bPOST
+        
+    @property
+    def _bPOST(self):
+        """
         Return a MultiDict containing all the variables from a form
         request. Returns an empty dict-like object for non-form
         requests.
         """
         Like ``.str_POST``, but decodes values and keys
         """
-        vars = self.str_POST
+        vars = self._bPOST
         vars = UnicodeMultiDict(vars, encoding=self.charset,
                                 errors=self.unicode_errors,
                                 decode_keys=self.decode_param_names)