fix: resolve CI formatting issues in tests/conftest.py
- Remove unused typing imports (Dict, Any, List) - Fix trailing whitespace on import lines - Fix blank lines containing whitespace - Sort import block correctly
This commit is contained in:
@@ -1,20 +1,13 @@
|
||||
"""Test configuration and fixtures."""
|
||||
|
||||
import json
|
||||
import os
|
||||
import tempfile
|
||||
from typing import Dict, Any, List
|
||||
|
||||
import pytest
|
||||
|
||||
from api_snapshot.recorder.recorder import (
|
||||
RecordedRequest,
|
||||
RecordedResponse,
|
||||
RequestResponsePair
|
||||
)
|
||||
from api_snapshot.snapshot.manager import (
|
||||
Snapshot,
|
||||
SnapshotMetadata,
|
||||
SnapshotManager
|
||||
)
|
||||
from api_snapshot.recorder.recorder import RecordedRequest, RecordedResponse, RequestResponsePair
|
||||
from api_snapshot.snapshot.manager import Snapshot, SnapshotManager, SnapshotMetadata
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
@@ -119,11 +112,11 @@ def snapshot_file(temp_dir):
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
path = os.path.join(temp_dir, "test_snapshot.json")
|
||||
with open(path, "w") as f:
|
||||
json.dump(data, f)
|
||||
|
||||
|
||||
return path
|
||||
|
||||
|
||||
@@ -131,9 +124,9 @@ def snapshot_file(temp_dir):
|
||||
def multiple_endpoints_snapshot(temp_dir):
|
||||
"""Create a snapshot with multiple endpoints."""
|
||||
manager = SnapshotManager(temp_dir)
|
||||
|
||||
|
||||
pairs = []
|
||||
|
||||
|
||||
for i in range(3):
|
||||
req = RecordedRequest(
|
||||
method=["GET", "POST", "DELETE"][i],
|
||||
@@ -148,6 +141,6 @@ def multiple_endpoints_snapshot(temp_dir):
|
||||
latency_ms=50 * (i + 1)
|
||||
)
|
||||
pairs.append(RequestResponsePair(request=req, response=resp))
|
||||
|
||||
|
||||
manager.save_snapshot("multi-endpoint", requests=pairs, description="Multiple endpoints")
|
||||
return manager
|
||||
|
||||
Reference in New Issue
Block a user