refactor(storage): remove duplicate watchlist query
This commit is contained in:
@@ -17,6 +17,7 @@ from backend.features.market.insights.dragon import build_dragon_list
|
||||
from backend.features.market.insights.popularity import build_popularity
|
||||
from backend.features.market.insights.service import MarketInsightService
|
||||
from backend.features.market.insights.themes import build_theme_detail, build_theme_library
|
||||
from backend.features.review.repository import ReviewRepository
|
||||
|
||||
SHANGHAI = ZoneInfo("Asia/Shanghai")
|
||||
|
||||
@@ -106,7 +107,7 @@ def test_watchlist_rows_are_built_only_from_current_account_entries() -> None:
|
||||
def test_watchlist_repository_isolates_accounts(tmp_path) -> None:
|
||||
database = Database(tmp_path / "watchlists.db")
|
||||
MigrationRunner(database).upgrade(MIGRATIONS)
|
||||
repository = MarketRepository()
|
||||
repository = ReviewRepository()
|
||||
with database.transaction() as connection:
|
||||
for user_id, username in ((1, "account-a"), (2, "account-b")):
|
||||
connection.execute(
|
||||
@@ -342,7 +343,10 @@ def insight_service(tmp_path, dynamic_available: bool = True) -> MarketInsightSe
|
||||
payload=prior,
|
||||
)
|
||||
return MarketInsightService(
|
||||
database, repository, AuctionGateway(dynamic_available) # type: ignore[arg-type]
|
||||
database,
|
||||
repository,
|
||||
ReviewRepository(),
|
||||
AuctionGateway(dynamic_available), # type: ignore[arg-type]
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user