# Path: premis_event_service/views.py
# ARK_ID_REGEX = re.compile(r'ark:/'+str(ARK_NAAN)+r'/\w.*')
# MAINTENANCE_MSG = settings.MAINTENANCE_MSG
# EVENT_UPDATE_TRANSLATION_DICT = xpath_map
# XML_HEADER = b"<?xml version=\"1.0\"?>\n%s"
# EVENT_SEARCH_PER_PAGE = 200
#     DATE_FORMAT = "%m/%d/%Y"
# def get_request_body(request):
# def app(request):
# def humanEvent(request, identifier=None):
# def last_page_ordinal(query_set, per_page=20):
# def get_page_offsets(query_set, page, page_range, page_lims, per_page=20):
# def paginate_events(valid, request, per_page=20):
# def event_search(request):
# def json_event_search(request):
# def recent_event_list(request):
# def json_agent(request, identifier=None):
# def humanAgent(request, identifier=None):
# def eventXML(request, identifier=None):
# def findEvent(request, linked_identifier, event_type=None):
# def agentXML(request, identifier):
# def app_event(request, identifier=None):
# def app_agent(request, identifier=None):


from django.urls import resolve
from premis_event_service import views
    assert url.func == views.app_event


def test_app_agent_without_identifier():
    url = resolve('/APP/agent/')
    assert url.func == views.app_agent


def test_app_agent_with_identifier():
    url = resolve('/APP/agent/agentId/')
    assert url.func == views.app_agent


def test_event_list():
    url = resolve('/event/')
    assert url.func == views.recent_event_list


def test_event_search():
    url = resolve('/event/search/')
    assert url.func == views.event_search


def test_event_search_json():
    url = resolve('/event/search.json')
    assert url.func == views.json_event_search


def test_findEvent():
    url = resolve('/event/find/ark:/00001/coda1n/00000000000000000000000000000000/')

# Path: premis_event_service/views.py
# ARK_ID_REGEX = re.compile(r'ark:/'+str(ARK_NAAN)+r'/\w.*')
# MAINTENANCE_MSG = settings.MAINTENANCE_MSG
# EVENT_UPDATE_TRANSLATION_DICT = xpath_map
# XML_HEADER = b"<?xml version=\"1.0\"?>\n%s"
# EVENT_SEARCH_PER_PAGE = 200
#     DATE_FORMAT = "%m/%d/%Y"
# def get_request_body(request):
# def app(request):
# def humanEvent(request, identifier=None):
# def last_page_ordinal(query_set, per_page=20):
# def get_page_offsets(query_set, page, page_range, page_lims, per_page=20):
# def paginate_events(valid, request, per_page=20):
# def event_search(request):
# def json_event_search(request):
# def recent_event_list(request):
# def json_agent(request, identifier=None):
# def humanAgent(request, identifier=None):
# def eventXML(request, identifier=None):
# def findEvent(request, linked_identifier, event_type=None):
# def agentXML(request, identifier):
# def app_event(request, identifier=None):
# def app_agent(request, identifier=None):


# Path: tests/test_urls.py
from django.urls import resolve
from premis_event_service import views

    assert url.func == views.app_event


def test_app_agent_without_identifier():
    url = resolve('/APP/agent/')
    assert url.func == views.app_agent


def test_app_agent_with_identifier():
    url = resolve('/APP/agent/agentId/')
    assert url.func == views.app_agent


def test_event_list():
    url = resolve('/event/')
    assert url.func == views.recent_event_list


def test_event_search():
    url = resolve('/event/search/')
    assert url.func == views.event_search


def test_event_search_json():
    url = resolve('/event/search.json')
    assert url.func == views.json_event_search


def test_findEvent():
    url = resolve('/event/find/ark:/00001/coda1n/00000000000000000000000000000000/')

    assert url.func == views.findEvent