Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_by_zipcode_non_standard(self):
"""
Test by_zipcode should return any type zipcode.
"""
z = self.search.by_zipcode(48874)
assert z.zipcode_type != ZipcodeType.Standard
assert z.lat is not None
land_area_in_sqmi_lower=None,
land_area_in_sqmi_upper=None,
water_area_in_sqmi_lower=None,
water_area_in_sqmi_upper=None,
housing_units_lower=None,
housing_units_upper=None,
occupied_housing_units_lower=None,
occupied_housing_units_upper=None,
median_home_value_lower=None,
median_home_value_upper=None,
median_household_income_lower=None,
median_household_income_upper=None,
zipcode_type=ZipcodeType.Standard,
sort_by=SimpleZipcode.zipcode.name,
ascending=True,
returns=DEFAULT_LIMIT):
"""
Query zipcode the simple way.
:param zipcode: int or str, find the exactly matched zipcode. Will be
automatically zero padding to 5 digits
:param prefix: str, zipcode prefix.
:param pattern: str, zipcode wildcard.
:param city: str, city name.
:param state: str, state name, two letter abbr or state full name.
:param lat: latitude.
:param lng: longitude.
:param radius: number, only returns zipcodes within a specific circle.
:param population_lower:
def by_pattern(self,
pattern,
zipcode_type=ZipcodeType.Standard,
sort_by=SimpleZipcode.zipcode.name,
ascending=True,
returns=DEFAULT_LIMIT):
"""
Search zipcode by wildcard.
Returns multiple results.
"""
return self.query(
pattern=pattern,
sort_by=sort_by, zipcode_type=zipcode_type,
ascending=ascending, returns=returns,
)