def test_validate_metadata_valid(self): md = validate_metadata( '<?xml version="1.0" encoding="UTF-8"?><content></content>') assert md == '<?xml version="1.0" encoding="UTF-8"?><content></content>'
def test_validate_metadata_invalid(self): with pytest.raises(ValidationError): validate_metadata('')