32 lines
862 B
Python
32 lines
862 B
Python
from django.conf import settings
|
|
from django.utils import timezone
|
|
import pytest
|
|
from django.test import Client
|
|
|
|
from generic.models import Modality, Plane, Contrast, Examination, Site
|
|
from django.contrib.auth import get_user_model
|
|
|
|
@pytest.fixture
|
|
def create_user(db):
|
|
return get_user_model().objects.create_user(
|
|
username="testuser",
|
|
password="testpassword",
|
|
email="test@test.com"
|
|
)
|
|
|
|
@pytest.fixture
|
|
def create_modality():
|
|
return Modality.objects.create(modality="Test Modality")
|
|
|
|
@pytest.fixture
|
|
def create_plane():
|
|
return Plane.objects.create(plane="Test Plane")
|
|
|
|
@pytest.fixture
|
|
def create_contrast():
|
|
return Contrast.objects.create(contrast="Test Contrast")
|
|
|
|
@pytest.fixture
|
|
def create_examination(create_modality):
|
|
return Examination.objects.create(examination="Test Examination", modality=create_modality)
|