Files
penracourses/rapids/tests/test_models.py
T
2022-05-21 11:20:21 +01:00

21 lines
483 B
Python

import pytest
from rapids.models import Abnormality, Exam
#@pytest.mark.django_db
def test_create_abnormality(db):
abnormality = Abnormality.objects.create(name="Abnorm")
assert abnormality.name == "Abnorm"
@pytest.fixture
def create_exam(db):
return Exam.objects.create(name="test exam")
def test_exam_creation(create_exam):
exams = Exam.objects.filter(name="test exam")
assert exams.exists()
exam = exams.first()
assert exam.time_limit == 35 * 60