Changeset View
Changeset View
Standalone View
Standalone View
looper/tests/test_gateways.py
- This file was moved from tests/test_gateways.py.
| from typing import Any | from typing import Any | ||||
| from unittest import mock | from unittest import mock | ||||
| from django.contrib.auth.models import User | from django.contrib.auth.models import User | ||||
| from looper import exceptions, gateways, models, money | from looper import exceptions, gateways, models, money | ||||
| from looper.models import Customer | from looper.models import Customer | ||||
| from tests.base import AbstractBaseTestCase | from .base import AbstractBaseTestCase | ||||
| class GatewayModelTest(AbstractBaseTestCase): | class GatewayModelTest(AbstractBaseTestCase): | ||||
| def test_is_default(self) -> None: | def test_is_default(self) -> None: | ||||
| gw1 = models.Gateway.objects.create(name='gw1', is_default=True) | gw1 = models.Gateway.objects.create(name='gw1', is_default=True) | ||||
| gw2 = models.Gateway.objects.create(name='gw2', is_default=False) | gw2 = models.Gateway.objects.create(name='gw2', is_default=False) | ||||
| gw2.is_default = True | gw2.is_default = True | ||||
| ▲ Show 20 Lines • Show All 116 Lines • Show Last 20 Lines | |||||