# FILEPATH: /home/ross/rad/rad/rapids/tests/test_models.py

from django.contrib.auth import get_user_model
from rcr.models import Item, Level, RadiologyCategory, OncologyCategory, Outcome, OutcomeReason
import pytest




def test_item_creation(create_item):
    assert Item.objects.count() == 1
    assert Item.objects.first().name == "Test Item"

def test_item_str(create_item):
    assert str(create_item) == "Test Specialty / Test Content Type / Test Item [Completed ONC] [Completed RAD]"

def test_item_get_assessed_by(create_item, create_radiology_user):
    create_item.assessed_by.add(create_radiology_user)
    assert create_item.get_assessed_by() == f"<span title='Assessed by Radiology User'>RU</span>"