Changeset View
Changeset View
Standalone View
Standalone View
looper/tests/test_moneyfield.py
- This file was moved from tests/test_moneyfield.py.
| import json | import json | ||||
| from typing import Mapping | from typing import Mapping | ||||
| from django.core import serializers | from django.core import serializers | ||||
| from django.core.files.base import File | from django.core.files.base import File | ||||
| from django.utils.datastructures import MultiValueDict | from django.utils.datastructures import MultiValueDict | ||||
| import looper.admin | import looper.admin | ||||
| from looper import models | from looper import models | ||||
| from looper.money import CurrencyMismatch, Money | from looper.money import CurrencyMismatch, Money | ||||
| from tests.base import AbstractBaseTestCase, AbstractLooperTestCase | from .base import AbstractBaseTestCase, AbstractLooperTestCase | ||||
| class MoneyFieldTest(AbstractBaseTestCase): | class MoneyFieldTest(AbstractBaseTestCase): | ||||
| fixtures = ['testuser', 'devfund'] | fixtures = ['testuser', 'devfund'] | ||||
| def test_create_instance(self) -> None: | def test_create_instance(self) -> None: | ||||
| pv = models.PlanVariation(plan_id=1, currency='EUR', price=Money('EUR', 155)) | pv = models.PlanVariation(plan_id=1, currency='EUR', price=Money('EUR', 155)) | ||||
| self.assertEqual(Money('EUR', 155), pv.price) | self.assertEqual(Money('EUR', 155), pv.price) | ||||
| ▲ Show 20 Lines • Show All 76 Lines • Show Last 20 Lines | |||||