def test_exception(self, value, ip_version, expected): with pytest.raises(expected): sanitize_network(value, ip_version)
def test_normal(self, value, ip_version, expected): assert sanitize_network(value, ip_version) == expected