Initial commit
This commit is contained in:
11
tests/test_utils.py
Normal file
11
tests/test_utils.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from hpoi.models.currency import Currency
|
||||
from hpoi.utils import get_price_from_text
|
||||
|
||||
|
||||
def test_get_price_from_text():
|
||||
assert get_price_from_text("0人民币") == {}
|
||||
assert get_price_from_text("9,400日元 (含税,465元)") == {
|
||||
Currency.CNY: 465,
|
||||
Currency.JPY: 9400,
|
||||
}
|
||||
assert get_price_from_text("249人民币") == {Currency.CNY: 249}
|
Reference in New Issue
Block a user