Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions integrations/unstructured/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -163,4 +163,5 @@ exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"]

[tool.pytest.ini_options]
minversion = "6.0"
addopts = "--strict-markers"
markers = ["integration: integration tests"]
16 changes: 16 additions & 0 deletions integrations/unstructured/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

import pytest

from haystack_integrations.components.converters.unstructured import UnstructuredFileConverter

LOCAL_API_URL = "http://localhost:8000/general/v0/general"


@pytest.fixture
def set_env_variables(monkeypatch):
Expand All @@ -11,3 +15,15 @@ def set_env_variables(monkeypatch):
@pytest.fixture
def samples_path():
return Path(__file__).parent / "samples"


@pytest.fixture
def local_api_url() -> str:
"""URL of an Unstructured API running locally, which needs no API key."""
return LOCAL_API_URL


@pytest.fixture
def local_converter(local_api_url) -> UnstructuredFileConverter:
"""A converter pointing at a local API, so no API key is required."""
return UnstructuredFileConverter(api_url=local_api_url)
Loading
Loading