def testAlternateProtocol(self): self.do_test(protojson, transport.Transport(protocol=protojson))
def testDefaultProtocol(self): self.do_test(protobuf, transport.Transport())
def testProtocolByName(self): remote.Protocols.get_default().add_protocol(protojson, 'png', 'image/png', ()) trans = transport.Transport(protocol='png') self.do_test(protojson, trans)
def testProtocolConfig(self): protocol_config = remote.ProtocolConfig(protojson, 'protoconfig', 'image/png') trans = transport.Transport(protocol=protocol_config) self.do_test(protojson, trans) self.assertTrue(trans.protocol_config is protocol_config)
def testAlternateProtocol(self): trans = transport.Transport(protocol=protojson) self.do_test(protojson, trans) self.assertEquals(protojson, trans.protocol_config.protocol) self.assertEquals('default', trans.protocol_config.name)
def testDefaultProtocol(self): trans = transport.Transport() self.do_test(protobuf, trans) self.assertEquals(protobuf, trans.protocol_config.protocol) self.assertEquals('default', trans.protocol_config.name)