def test_files_put_raises_ValueError_if_path_is_empty(): with mock.patch("socket.gethostbyname", return_value="127.0.0.1"): files = Files() with pytest.raises(ValueError, match="path argument must be a valid non-empty string"): files.put("", MetaDocument("path"))
def test_files_put_raises_ValueError_if_metadata_is_None(): with mock.patch("socket.gethostbyname", return_value="127.0.0.1"): files = Files() with pytest.raises(ValueError, match="metadata argument must be a valid Metadata object"): files.put("path", None)