Skip to content

Commit 16cf6cb

Browse files
committed
test: add assertion to verify cache behavior in analyze_financial_asset
1 parent d23a861 commit 16cf6cb

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tests/unit/test_analyze_financial_asset_cache.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
import json
88
from unittest.mock import MagicMock, patch
99

10-
import pytest
11-
1210
from src.tools.analyze_financial_asset import (
1311
_CACHE,
1412
_get_cache_key,
@@ -243,6 +241,7 @@ def test_use_cache_false_bypasses_cache(
243241
# Second call with use_cache=False should call functions again
244242
result2 = analyze_financial_asset("SWDA", years=10, use_cache=False)
245243

244+
assert result2 == result1
246245
# Verify functions WERE called even though data is cached
247246
assert mock_search_symbol.called
248247
assert mock_get_prices.called

0 commit comments

Comments
 (0)