Skip to content

Commit cc039f3

Browse files
committed
test(metrics): add test fixtures for metrics module
- Create `metrics_fixtures.py` with pytest fixture - Set up fixture to return a `Metrics` object with actual API call - Configure fixture with function scope for isolated testing
1 parent e4f3b2b commit cc039f3

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/fixtures/metrics_fixtures.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
"""Fixtures for the Metrics class tests."""
2+
3+
import pytest
4+
5+
from typesense.api_call import ApiCall
6+
from typesense.metrics import Metrics
7+
8+
9+
@pytest.fixture(scope="function", name="actual_metrics")
10+
def actual_debug_fixture(actual_api_call: ApiCall) -> Metrics:
11+
"""Return a Debug object using a real API."""
12+
return Metrics(actual_api_call)

0 commit comments

Comments
 (0)