async def test_can_send_frame(self): stomp = StompReader(None, self.loop) stomp._transport = Mock() stomp.send_frame("SUBSCRIBE", {"ack": "auto"}, "ç") stomp._transport.write.assert_called_with(b"SUBSCRIBE\n" b"ack:auto\n" b"\n" b"\xc3\xa7\x00")
async def test_can_send_frame(self): stomp = StompReader(None, self.loop) stomp._transport = Mock() stomp.send_frame('SUBSCRIBE', {'ack': 'auto'}, 'ç') stomp._transport.write.assert_called_with(b'SUBSCRIBE\n' b'ack:auto\n' b'\n' b'\xc3\xa7\x00')
async def test_send_frame_can_raise_error(self): stomp = StompReader(None, self.loop) stomp._transport = None with self.assertRaises(StompDisconnectedError): stomp.send_frame("SUBSCRIBE", {"ack": "auto"}, "ç")
async def test_send_frame_can_raise_error(self): stomp = StompReader(None, self.loop) stomp._transport = None with self.assertRaises(StompDisconnectedError): stomp.send_frame('SUBSCRIBE', {'ack': 'auto'}, 'ç')