Initial commit

This commit is contained in:
2025-05-21 16:19:06 +02:00
commit 4ec4a27b89
23 changed files with 1230 additions and 0 deletions

11
tests/test_utils.py Normal file
View 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}