示例#1
0
def test_recv_function_something_to_recv(sock):
    msg = utils.__command('nothing', 'MSG')
    s = sock.get(tosend=msg)
    cmd, m = utils.recv(s)
    assert cmd == 'MSG'
    assert m == 'nothing'
示例#2
0
def test_recv_function_nothing_to_recieve(sock):
    s = sock.get()
    cmd, msg = utils.recv(s)
    assert cmd is None
    assert msg is None