def test_from_bytes_failure(self): with pytest.raises(ValueError): FetcherMessage.from_bytes(b"random bytes")
def test_from_bytes_success(self, message): assert FetcherMessage.from_bytes(bytes(message) + 42 * b"*") == message
def test_from_bytes_failure(self): with pytest.raises(ValueError): FetcherMessage.from_bytes(b"random bytes")
def test_from_bytes_success(self, message): assert FetcherMessage.from_bytes(bytes(message) + 42 * b"*") == message