Changeset 1488

Show
Ignore:
Timestamp:
07/09/08 10:13:20 (2 months ago)
Author:
nick
Message:

Added tests

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pyamf/branches/twisted-gateway-tuple-313/pyamf/tests/gateway/test_twisted.py

    r1416 r1488  
    274274        return d.addBoth(switch) 
    275275 
     276    def test_tuple(self): 
     277        env = remoting.Envelope(pyamf.AMF0, pyamf.ClientTypes.Flash9) 
     278        request = remoting.Request('echo', body=[('Hi', 'Mom')]) 
     279        env['/1'] = request 
     280 
     281        d = client.getPage("http://127.0.0.1:%d/" % (self.port,), 
     282                method="POST", postdata=remoting.encode(env).getvalue()) 
     283 
     284        def cb(result): 
     285            response = remoting.decode(result) 
     286 
     287            self.assertEquals(body_response.status, remoting.STATUS_OK) 
     288            self.assertEquals(body_response.body, ('Hi', 'Mom')) 
     289 
     290        return d.addCallback(cb) 
     291 
    276292class DummyHTTPRequest: 
    277293    def __init__(self):