def test_convert_to_bytes_error(string): with pytest.raises(ValueError) as err: DockerStorage.convert_to_bytes(string) assert "Cannot convert" in str(err.value) assert string in str(err.value)
def test_convert_to_bytes_error(string): with pytest.raises(ValueError) as err: DockerStorage.convert_to_bytes(string) assert "Cannot convert" in str(err.value) assert string in str(err.value)
def test_convert_to_bytes(string, expect_bytes): got = DockerStorage.convert_to_bytes(string) assert got == expect_bytes
def test_convert_to_bytes(string, expect_bytes): got = DockerStorage.convert_to_bytes(string) assert got == expect_bytes