Ejemplo n.º 1
0
def test_truncated_length():
    p = longpoll.PushDataParser()
    assert list(p.get_submissions('13')) == []
Ejemplo n.º 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']
Ejemplo n.º 3
0
def test_truncated_message():
    p = longpoll.PushDataParser()
    assert list(p.get_submissions('12\n012345678')) == []