Skip to content
This repository was archived by the owner on Dec 5, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import os

import pytest
from pytest_cases import fixture

Expand All @@ -13,18 +15,22 @@
@fixture(scope="session")
def api_client(pytestconfig):
if pytestconfig.getoption("--drone"):
return OpenCTIApiClient(
"http://opencti:4000",
"bfa014e0-e02e-4aa6-a42b-603b19dcf159",
ssl_verify=False,
api_url = os.getenv("OPENCTI_API_URL", "http://opencti:4000")
api_token = os.getenv(
"OPENCTI_API_TOKEN", "bfa014e0-e02e-4aa6-a42b-603b19dcf159"
)
else:
return OpenCTIApiClient(
"http://localhost:4000",
"d434ce02-e58e-4cac-8b4c-42bf16748e84",
ssl_verify=False,
api_url = os.getenv("OPENCTI_API_URL", "http://localhost:4000")
api_token = os.getenv(
"OPENCTI_API_TOKEN", "d434ce02-e58e-4cac-8b4c-42bf16748e84"
)

return OpenCTIApiClient(
api_url,
api_token,
ssl_verify=False,
)


@fixture(scope="session")
def api_connector(api_client):
Expand Down