Skip to content

Commit

Permalink
by_symbol_match : test function is case insensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
Roxane committed Oct 29, 2024
1 parent a576984 commit 6645610
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/test_by_symbol.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,22 @@ def test_by_symbol_match_filters_country_code(
res = iso4217parse.by_symbol_match(example_string, country_code)
assert len(res) == 1
assert res[0].alpha3 == expected


@pytest.mark.parametrize(
'text, expected_alpha3',
(
# symbol should be lowercase
('lek', 'ALL'),
('Lek', 'ALL'),
('LEK', 'ALL'),
# symbol should be uppercase
('DH', 'AED'),
('Dh', 'AED'),
('dh', 'AED'),
),
)
def test_parse_by_symbol_value_is_case_insensitive(text, expected_alpha3):
res = iso4217parse.by_symbol_match(text)
assert len(res) == 1
assert res[0].alpha3 == expected

0 comments on commit 6645610

Please sign in to comment.