Skip to content

Commit

Permalink
test another case in req.text that was uncovered
Browse files Browse the repository at this point in the history
  • Loading branch information
mcdonc committed May 9, 2012
1 parent 7199654 commit 600b1ca
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test_request.py
Expand Up @@ -442,6 +442,14 @@ def test__text_get_without_charset(self):
req._charset = ''
self.assertRaises(AttributeError, getattr, req, 'text')

def test__text_set_without_charset(self):
body = b'test'
INPUT = BytesIO(body)
environ = {'wsgi.input': INPUT, 'CONTENT_LENGTH': str(len(body))}
req = self._makeOne(environ)
req._charset = ''
self.assertRaises(AttributeError, setattr, req, 'text', 'abc')

# POST
def test_POST_not_POST_or_PUT(self):
from webob.multidict import NoVars
Expand Down

0 comments on commit 600b1ca

Please sign in to comment.