<commit_before>from echo_server import create_server_socket, response_ok, response_error, parse_request


def test_ok():
    assert response_ok() == """
        HTTP/1.1 200 OK\r\n
        Content-Type: text/plain\r\n
        \r\n
        Hey you.\r\n
    """


def test_error():
    assert response_error()


def test_parse():
    assert parse_request('hello')
<commit_msg>Added a basic case for testing the parser.<commit_after>from echo_server import create_server_socket, response_ok, response_error, parse_request


def test_ok():
    assert response_ok() == """
        HTTP/1.1 200 OK\r\n
        Content-Type: text/plain\r\n
        \r\n
        Hey you.\r\n
    """


def test_error():
    assert response_error(404) == """
        HTTP/1.1 404\r\n
        \r\n
    """


def test_parse():
    # Working case
    test_string = """
        GET some_uri HTTP/1.1\r\n
        some head\r\n
        \r\n
        some body\r\n
    """
    assert parse_request(test_string) == "some_uri"
    # Bad protocol case

    # Non-GET case

{'fraction_non_alphanumeric': 0.12367149758454106, 'fraction_numerical': 0.01932367149758454, 'mean_word_length': 2.2074303405572757, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3654417', 'n_tokens_mistral': 364, 'n_tokens_neox': 345, 'n_words': 81}