prvi kod za live uporabu
Some checks failed
ERP CI Pipeline / test (push) Has been cancelled

This commit is contained in:
mariomitte
2026-07-09 21:21:17 +02:00
parent 857bb65d52
commit 5d39e048ba
239 changed files with 25151 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
import pytest
from django.contrib.auth import get_user_model
User = get_user_model()
@pytest.mark.django_db
def test_create_user():
"""Testira kreiranje standardnog korisnika."""
user = User.objects.create_user(
email="test@example.com",
password="password123"
)
assert user.email == "test@example.com"
assert user.check_password("password123")
assert user.is_active is True
@pytest.mark.django_db
def test_create_superuser():
"""Testira kreiranje superuser-a."""
admin = User.objects.create_superuser(
email="admin@example.com",
password="password123"
)
assert admin.is_superuser is True
assert admin.is_staff is True