# from tests.conftest import client


# # Values persist from the drivers_test
# def test_fetch_all_routes() -> None:
#     response = client.get("/route")
#     actual = response.json()[0]
#     expected = {"route_id": 1, "delivery_id": 0}
#     assert response.status_code == 200
#     assert isinstance(actual, dict)
#     assert actual == expected

# def test_create_route() -> None:
#     response = client.post("/routes", json = {"route_id": 1, "delivery_id": 0})
#     assert response.status_code == 201

# def test_fetch_one_route() -> None:
#     response = client.get("/routes/0")
#     actual = response.json()
#     expected = {"route_id": 0, "delivery_id": 0}
#     assert response.status_code == 200
#     assert isinstance(actual, dict)
#     assert actual == expected

# @mock.patch("psycopg2.connect")
# def test_fetch_one_route_does_not_exist(mock_connect) -> None:
#     mock_data = [0, 0]
#     mock_connect.return_value.cursor.return_value.fetchall.return_value = mock_data
#     response = client.get("/routes/1")
#     assert response.status_code == 404

# @mock.patch("psycopg2.connect")
# def test_update_route(mock_connect) -> None:
#     response = client.put("/routes/0", json = {"route_id": 0, "delivery_id": 0})
#     assert response.status_code == 202

# @mock.patch("psycopg2.connect")
# def test_delete_route(mock_connect) -> None:
#   response = client.delete("/routes/0")
#   assert response.status_code == 200
