membersystem/tests/test_accounting.py

14 lines
353 B
Python
Raw Normal View History

"""Tests for accounting."""
2018-06-24 01:05:02 +02:00
import pytest
from accounting import models
2018-06-24 01:05:02 +02:00
from django.contrib.auth.models import User
2019-09-01 00:27:36 +02:00
2024-02-29 21:25:59 +01:00
@pytest.mark.django_db()
2024-02-29 21:30:11 +01:00
def test_balance() -> None:
"""Test balance."""
2018-06-24 01:05:02 +02:00
user = User.objects.create_user("test", "lala@adas.com", "1234")
2019-09-01 00:27:36 +02:00
account = models.Account.objects.create(owner=user)
2018-06-24 01:05:02 +02:00
assert account.balance == 0