def test_from_network(self): header = Header("fetch", "SUCCESS", "crit", 42) assert Header.from_network(bytes(header) + 42 * b"*") == header
def test_from_network(self): header = Header("fetch", "SUCCESS", "hint", 42) assert Header.from_network(str(header) + 42 * "*") == header