Changeset 1489

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

Applied patch from ticket (plus a few tweaks to the test case)

Location:
pyamf/branches/twisted-gateway-tuple-313/pyamf
Files:
2 modified

Legend:

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

    r1487 r1489  
    6969 
    7070        def response_cb(result): 
    71             self.gateway.logger.debug("AMF Response: %r" % result) 
     71            self.gateway.logger.debug("AMF Response: %s" % (result,)) 
    7272            response.body = result 
    7373            deferred_response.callback(response) 
  • pyamf/branches/twisted-gateway-tuple-313/pyamf/tests/gateway/test_twisted.py

    r1488 r1489  
    275275 
    276276    def test_tuple(self): 
     277        def echo(data): 
     278            return data 
     279 
     280        self.gw.addService(echo) 
     281 
    277282        env = remoting.Envelope(pyamf.AMF0, pyamf.ClientTypes.Flash9) 
    278283        request = remoting.Request('echo', body=[('Hi', 'Mom')]) 
     
    284289        def cb(result): 
    285290            response = remoting.decode(result) 
     291            body_response = response['/1'] 
     292            print body_response 
    286293 
    287294            self.assertEquals(body_response.status, remoting.STATUS_OK) 
    288             self.assertEquals(body_response.body, ('Hi', 'Mom')) 
     295            self.assertEquals(body_response.body, ['Hi', 'Mom']) 
    289296 
    290297        return d.addCallback(cb)