import pytest
from project0 import project0

status_check = """911 Call Nature Unknown | 1"""


# Check for the first incident nature and count
def test_status():
    url = "https://www.normanok.gov/sites/default/files/documents/2021-03/2021-03-04_daily_incident_summary.pdf"
    incident_data = project0.fetchincidents(url)
    incidents = project0.extractincidents(incident_data)
    db = project0.createdb(True)
    project0.populatedb(db, incidents)
    status = project0.status(db).split("\n")[0]
    if status != status_check:
        pytest.fail("Status not matching")

import pytest
from project0 import project0

status_check = """911 Call Nature Unknown | 1"""


# Check for the first incident nature and count
def test_status():
    url = "https://www.normanok.gov/sites/default/files/documents/2021-03/2021-03-04_daily_incident_summary.pdf"
    incident_data = project0.fetchincidents(url)
    incidents = project0.extractincidents(incident_data)
    db = project0.createdb(True)
    project0.populatedb(db, incidents)
    status = project0.status(db).split("\n")[0]
    if status != status_check:
        pytest.fail("Status not matching")

911 Call Nature Unknown | 1 # Check for the first incident nature and count