Skip to content

Commit

Permalink
Remove the "_set" suffix from test module
Browse files Browse the repository at this point in the history
The type is already documented in the type hints
  • Loading branch information
jond01 committed Sep 29, 2023
1 parent 9cc8c0f commit 6e1a7c1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/test_boi_banks_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
BOI_XML_URL = "\
https://www.boi.org.il/boi_files/Pikuah/banking_corporations_en.xml"

KNOWN_BANKS_SET = {
KNOWN_BANKS = {
"Bank Hapoalim B.M",
"Bank Leumi Le-Israel B.M",
"Bank Massad Ltd",
Expand All @@ -25,16 +25,16 @@
}


@pytest.fixture(name="boi_banks_set")
def fixture_boi_banks_set() -> set[str]:
@pytest.fixture(name="boi_banks")
def fixture_boi_banks() -> set[str]:
"""Get the set on Israeli banks from BOI online XML"""
with get_boi_url_response(BOI_XML_URL) as response:
df = pd.read_xml(response)
return set(df[df["Category"] == "COMMERCIAL BANKS"]["Name"])


def test_boi_banks(boi_banks_set: set[str]) -> None:
def test_boi_banks(boi_banks: set[str]) -> None:
"""Test the online set vs. the hard-coded one"""
assert (
boi_banks_set == KNOWN_BANKS_SET
boi_banks == KNOWN_BANKS
), "Mismatch between the updated banks list data from BOI and the saved data"

0 comments on commit 6e1a7c1

Please sign in to comment.