Exemple #1
0
def test_unicode_map(running_server):
    client_socket = get_client_socket()
    assert send_client_message(client_socket, 'unicode_map abracadabra') == {
        'a': 97,
        'b': 98,
        'c': 99,
        'd': 100,
        'r': 114
    }
Exemple #2
0
def test_reverse_word(running_server):
    client_socket = get_client_socket()
    assert send_client_message(client_socket,
                               'reverse_word elephant') == 'tnahpele'
def test_increment(running_server):
    client_socket = get_client_socket()
    assert send_client_message(client_socket, 'increment 5') == '6'
Exemple #4
0
def test_numbers(running_server):
    client_socket = get_client_socket()
    assert send_client_message(client_socket, 'numbers') == list(range(10))
def test_say(running_server):
    print("In test_say, about to get client socket")
    client_socket = get_client_socket()
    print("In test_say, about to send message")
    assert send_client_message(client_socket, 'say goodnight') == 'goodnight'