migration: preserve market data and search slice
This commit is contained in:
@@ -90,8 +90,8 @@ class StockDetailRealtimeTests(unittest.TestCase):
|
||||
"moneyflow": {},
|
||||
}
|
||||
|
||||
with patch("backend.application.datetime", FixedMarketDatetime), patch(
|
||||
"backend.application.TushareClient", RealtimeClientStub
|
||||
with patch("backend.features.market.service.datetime", FixedMarketDatetime), patch(
|
||||
"backend.features.market.service.TushareClient", RealtimeClientStub
|
||||
):
|
||||
result = self.service._prepare_stock_detail(cached, "002141", today)
|
||||
|
||||
@@ -112,8 +112,8 @@ class StockDetailRealtimeTests(unittest.TestCase):
|
||||
"stock": {"code": "002141", "price": 10, "change": 1.2},
|
||||
"prices": [{"trade_date": historical, "close": 10, "change": 1.2}],
|
||||
}
|
||||
with patch("backend.application.datetime", FixedMarketDatetime), patch(
|
||||
"backend.application.TushareClient", RealtimeClientStub
|
||||
with patch("backend.features.market.service.datetime", FixedMarketDatetime), patch(
|
||||
"backend.features.market.service.TushareClient", RealtimeClientStub
|
||||
):
|
||||
result = self.service._prepare_stock_detail(payload, "002141", historical)
|
||||
|
||||
@@ -151,8 +151,8 @@ class StockDetailRealtimeTests(unittest.TestCase):
|
||||
},
|
||||
],
|
||||
}
|
||||
with patch("backend.application.datetime", FixedPreopenDatetime), patch(
|
||||
"backend.application.TushareClient", RealtimeClientStub
|
||||
with patch("backend.features.market.service.datetime", FixedPreopenDatetime), patch(
|
||||
"backend.features.market.service.TushareClient", RealtimeClientStub
|
||||
):
|
||||
result = self.service._prepare_stock_detail(payload, "002141", today)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user