Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
lambda: zipcodes.is_real("06905"),
lambda: zipcodes._contains_nondigits("1234a"),
lambda: zipcodes.is_real("91239"),
# digits and "-" are acceptable
lambda: zipcodes._clean("0000a"), ValueError
),
(lambda: zipcodes._clean("06469"), lambda: "06469"),
(lambda: zipcodes.list_all(), lambda: zipcodes._zips),
(lambda: zipcodes._clean("0646", 4), lambda: "0646"),
# default behavior
lambda: zipcodes._clean("000000"), ValueError
),
lambda: zipcodes.similar_to("1005"),
lambda: [
lambda: zipcodes.similar_to("10001"),
lambda: [
lambda: zipcodes.similar_to("1018"),
lambda: [
lambda: len(
zipcodes.similar_to(
"2", zips=zipcodes.filter_by(active=True, city="Windsor")
)
)
== 3,
],