def test_search_throws_appropriate_error_for_invalid_max_settings(min_value, max_value, search_attr): search_attrs = { 'description': 'My Search', 'specified_location': 'My Location', 'geo_boundary_points': [{}, {}, {}], search_attr + "_min": min_value, search_attr + "_max": max_value, } with pytest.raises(ValidationError): Search._from_attrs(**search_attrs)
def construct_search(**kwargs): search = Search._from_attrs(**kwargs) return search
def test_search_throws_error_when_no_templates(): search = Search() with pytest.raises(ValidationError): search.request_availability_from_contacts(None, None, None)