Skip to content

Commit

Permalink
Minor reformat.
Browse files Browse the repository at this point in the history
  • Loading branch information
ray310 committed Jul 1, 2024
1 parent 86ca9c2 commit 8e23f32
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions tests/test_scrape_city_council.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,28 @@ def test_parse_cc_email():
"""Correct email address should come after mailto:."""
district_num = 1
test_cases = [
({"href": f"mailto:District{district_num}@council.nyc.gov"}, f"District{district_num}@council.nyc.gov"),
({"href": f"mailto:district{district_num}@council.nyc.gov"}, f"district{district_num}@council.nyc.gov"),
(
{"href": f"mailto:District{district_num}@council.nyc.gov"},
f"District{district_num}@council.nyc.gov",
),
(
{"href": f"mailto:district{district_num}@council.nyc.gov"},
f"district{district_num}@council.nyc.gov",
),
({"href": "mailto:[email protected]"}, "[email protected]"),
({"href": "[email protected]"}, f"district{district_num}@council.nyc.gov"),
({"href": "[email protected]"}, f"district{district_num}@council.nyc.gov"), # no mailto
({"href": "mailto:[email protected]"}, f"district{district_num}@council.nyc.gov"), # .com
(None, f"district{district_num}@council.nyc.gov")
(
{"href": "[email protected]"},
f"district{district_num}@council.nyc.gov",
),
(
{"href": "[email protected]"},
f"district{district_num}@council.nyc.gov",
), # no mailto
(
{"href": "mailto:[email protected]"},
f"district{district_num}@council.nyc.gov",
), # .com
(None, f"district{district_num}@council.nyc.gov"),
]
for case in test_cases:
assert scc.parse_cc_email(case[0], district_num) == case[1]

0 comments on commit 8e23f32

Please sign in to comment.