def test_echo_same_topic(): msg = 'testing' mock = PyrosMock() mock.topic('random_topic', msg) print("msg sent is {0}".format(msg)) recv_msg = mock.topic('random_topic') print("msg received is {0}".format(recv_msg)) assert msg == recv_msg
def test_other_topic(): msg = 'testing' mock = PyrosMock() mock.topic('random_topic', msg) print("msg sent is {0}".format(msg)) recv_msg = mock.topic('random_topic_2') print("msg received is {0}".format(recv_msg)) assert recv_msg is None
def test_echo_topic_default(): mock = PyrosMock() recv_msg = mock.topic('random_topic') assert recv_msg is None