mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-09-14 11:06:13 +05:00
30 lines
707 B
Python
30 lines
707 B
Python
import pytest
|
|
|
|
from .conftest import (
|
|
api_client_request,
|
|
init_archive,
|
|
)
|
|
|
|
pytestmark = pytest.mark.django_db(transaction=True)
|
|
|
|
|
|
def test_basic_success_case_request(client, tmp_path, api_headers):
|
|
init_archive(tmp_path)
|
|
|
|
response = api_client_request(
|
|
client,
|
|
"post",
|
|
"/api/v1/cli/add",
|
|
payload={
|
|
"urls": ["https://example.com/api-cli-add-basic"],
|
|
"depth": 0,
|
|
"parser": "url_list",
|
|
"plugins": "__archivebox_test_no_plugins__",
|
|
"index_only": True,
|
|
},
|
|
headers=api_headers,
|
|
)
|
|
|
|
assert response.status_code == 200, response.content
|
|
assert response.json()["success"] is True
|