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}