Skip to content

Commit 6933641

Browse files
fix: test uppercase normalisation
1 parent b544f98 commit 6933641

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

tests/test_validators.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,15 @@ class TestValidateInstrument:
2323
"EURUSD", "GBPUSD", "XAU_USD", "S&P-500", "BTC_USDT", "EUR123", "abc", "A",
2424
])
2525
def test_valid_instruments(self, instrument):
26-
assert validate_instrument(instrument) == instrument
26+
assert validate_instrument(instrument) == instrument.upper()
27+
28+
@pytest.mark.parametrize("raw,expected", [
29+
("eurusd", "EURUSD"),
30+
("XAUUSd", "XAUUSD"),
31+
("btc_usdt", "BTC_USDT"),
32+
])
33+
def test_instrument_normalized_to_upper(self, raw, expected):
34+
assert validate_instrument(raw) == expected
2735

2836
def test_empty_instrument_raises(self):
2937
with pytest.raises(HTTPException) as exc_info:

0 commit comments

Comments
 (0)