Exemple #1
0
def test_netstring_fails(bad_netstring, expected_exc):
    with pytest.raises(expected_exc):
        receiver.read_netstring(io.BytesIO(bad_netstring))
Exemple #2
0
def test_netstring_succeeds(netstring, parsed):
    assert receiver.read_netstring(io.BytesIO(netstring)) == parsed