membersystem/accounting/tests.py

16 lines
326 B
Python
Raw Normal View History

2018-06-24 01:05:02 +02:00
import pytest
from django.contrib.auth.models import User
from . import models
# @pytest.fixture
# def test():
# do stuff
2019-09-01 00:27:36 +02:00
2018-06-24 01:05:02 +02:00
@pytest.mark.django_db
def test_balance():
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