import json
import pytest
from django.urls import reverse

from rich.pretty import pprint

from bs4 import BeautifulSoup

from django.contrib.auth.models import Group

import django.test




def test_radiology_index_view(client, create_radiology_user):
    client.force_login(create_radiology_user)

    url = reverse("rcr:radiology_index_view")
    response = client.get(url)
    assert response.status_code == 200

def test_radiology_index_all_view(client, create_radiology_user):
    client.force_login(create_radiology_user)
    url = reverse("rcr:radiology_index_all_view")
    response = client.get(url)
    assert response.status_code == 200

def test_radiology_review_view(client, create_radiology_user):
    client.force_login(create_radiology_user)
    url = reverse("rcr:radiology_review_view")
    response = client.get(url)
    assert response.status_code == 302

def test_radiology_index_completed_view(client, create_radiology_user):
    client.force_login(create_radiology_user)
    url = reverse("rcr:radiology_index_completed_view")
    response = client.get(url)
    assert response.status_code == 200

def test_radiology_assessors_view(client, create_radiology_user):
    client.force_login(create_radiology_user)
    url = reverse("rcr:radiology_assessors_view")
    response = client.get(url)
    assert response.status_code == 200

def test_radiology_assigned_user_view(client, create_radiology_user):
    client.force_login(create_radiology_user)
    user_pk = create_radiology_user.pk
    url = reverse("rcr:radiology_assigned_user_view", args=[user_pk])
    response = client.get(url)
    assert response.status_code == 200

def test_radiology_assessor_assignment_view(client, create_radiology_user):
    client.force_login(create_radiology_user)
    assessor_pk = create_radiology_user.pk
    url = reverse("rcr:radiology_assessor_assignment_view", args=[assessor_pk])
    response = client.get(url)
    assert response.status_code == 200

def test_radiology_index_completed_by_user_view(client, create_radiology_user):
    client.force_login(create_radiology_user)
    user_pk = create_radiology_user.pk
    url = reverse("rcr:radiology_index_completed_by_user_view", args=[user_pk])
    response = client.get(url)
    assert response.status_code == 200

def test_radiology_detail_view(client, create_radiology_user, create_item):
    client.force_login(create_radiology_user)
    item_pk = create_item.pk
    url = reverse("rcr:radiology_detail_view", args=[item_pk])
    response = client.get(url)
    assert response.status_code == 200

def test_radiology_update_next_view(client, create_radiology_user):
    client.force_login(create_radiology_user)
    url = reverse("rcr:radiology_update_next_view")
    response = client.get(url)
    assert response.status_code == 302

def test_radiology_update_next_skip_view(client, create_radiology_user):
    client.force_login(create_radiology_user)
    skip = 1  # Replace with a valid skip value
    url = reverse("rcr:radiology_update_next_skip_view", args=[skip])
    response = client.get(url)
    assert response.status_code == 302

def test_radiology_update_view(client, create_radiology_user, create_item):
    client.force_login(create_radiology_user)
    item_pk = create_item.pk
    url = reverse("rcr:radiology_update_view", args=[item_pk])
    response = client.get(url)
    assert response.status_code == 200