Coverage for jbank/services.py: 0%

1 from datetime import datetime

2 from decimal import Decimal

3 from typing import Optional

4

5 from jbank.models import AccountBalance

6

7

8 def create_account_balance(record_datetime: datetime, account_number: str, bic: str, balance: Decimal, available_balance: Decimal, credit_limit: Optional[Decimal] = None, currency: str = "EUR", **kwargs): # type: ignore #noqa

9 return AccountBalance.objects.get_or_create(

10 record_datetime=record_datetime,

11 account_number=account_number,

12 bic=bic,

13 balance=balance,

14 available_balance=available_balance,

15 credit_limit=credit_limit,

16 currency=currency,

17 )[0]