mirror of
https://github.com/bellingcat/auto-archiver-api.git
synced 2026-06-08 03:28:35 +03:00
adds 403 tests
This commit is contained in:
@@ -43,9 +43,8 @@ def test_endpoint_health(client_with_auth):
|
||||
assert r.json() == {"status": "ok"}
|
||||
|
||||
|
||||
def test_endpoint_groups_403(client):
|
||||
r = client.get("/groups")
|
||||
assert r.status_code == 403
|
||||
def test_endpoint_groups_no_auth(client, test_no_auth):
|
||||
test_no_auth(client.get, "/groups")
|
||||
|
||||
|
||||
def test_endpoint_groups_rick_and_morty(client_with_auth):
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
from unittest.mock import patch
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
|
||||
def test_endpoint_task_status_no_auth(client, test_no_auth):
|
||||
test_no_auth(client.get, "/task/test-task-id")
|
||||
|
||||
|
||||
@patch("endpoints.task.AsyncResult")
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
|
||||
|
||||
import json
|
||||
import time
|
||||
from unittest.mock import patch
|
||||
|
||||
from db.schemas import ArchiveCreate, TaskResult
|
||||
|
||||
Reference in New Issue
Block a user