예제 #1
0
def test_truncated_length():
    p = longpoll.PushDataParser()
    assert list(p.get_submissions('13')) == []
예제 #2
0
def test_malformed_length():
    p = longpoll.PushDataParser()
    # TODO: could detect errors like these with some extra work
    assert list(
        p.get_submissions('11\n0123456789\n5e\n"abc"')) == ['0123456789\n']
예제 #3
0
def test_truncated_message():
    p = longpoll.PushDataParser()
    assert list(p.get_submissions('12\n012345678')) == []