Ejemplo n.º 1
0
def test_set_payload_message():
    payload = Payload()
    assert payload.type != PAYLOAD_ORDER_CREATE

    oc = OrderCreate(quantity=123456)
    set_payload_message(payload, oc)
    eq_(payload.type, PAYLOAD_ORDER_CREATE)
    eq_(payload.order_create, oc)
Ejemplo n.º 2
0
 def send(self, message):
     payload = self.session.out_payload
     payload.Clear()
     set_payload_message(payload, message)
     self._send()
Ejemplo n.º 3
0
 def send(self, message):
     payload = self.session.out_payload
     payload.Clear()
     set_payload_message(payload, message)
     self._send()