You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
395 B
17 lines
395 B
9 years ago
|
import six
|
||
|
|
||
|
import mock
|
||
|
|
||
|
from cherrypy import wsgiserver
|
||
|
|
||
|
|
||
|
class TestWSGIGateway_u0:
|
||
|
@mock.patch('cherrypy.wsgiserver.WSGIGateway_10.get_environ',
|
||
|
lambda self: {'foo': 'bar'})
|
||
|
def test_decodes_items(self):
|
||
|
req = mock.MagicMock(path=b'/', qs=b'')
|
||
|
gw = wsgiserver.WSGIGateway_u0(req=req)
|
||
|
env = gw.get_environ()
|
||
|
assert env['foo'] == 'bar'
|
||
|
assert isinstance(env['foo'], six.text_type)
|