def METHOD_NAME(self, client, tasks, statuses):
    url = "/tasks/?"
    for status in statuses:
        url += f"status={status}&"
    headers = {"Content-Type": "application/json"}
    response = client.get(url, headers=headers)
    assert response.status_code == 200
    tasks = {str(task["_id"]): task for task in tasks if task["status"] in statuses}
    items = json.loads(response.data)["items"]
    assert len(tasks) == len(items)
    for item in items:
        task = tasks[item["_id"]]
        self._assert_task(task, item)