feat: expand registry ingestion and demo exchange
This commit is contained in:
@@ -176,6 +176,29 @@ class SourceCardServiceUnitTest(SimpleTestCase):
|
||||
)
|
||||
self.assertEqual(enqueue_mock.call_count, 3)
|
||||
|
||||
@patch(
|
||||
"apps.parsers.source_cards.SourceCardService._enqueue_task",
|
||||
return_value={
|
||||
"task_id": "task-fns",
|
||||
"task_name": "apps.parsers.tasks.sync_fns_financial_reports",
|
||||
},
|
||||
)
|
||||
def test_refresh_card_for_financial_indicators_uses_api_sync(self, enqueue_mock):
|
||||
result = SourceCardService.refresh_card(
|
||||
slug="financial-indicators",
|
||||
requested_by_id=12,
|
||||
)
|
||||
|
||||
self.assertEqual(result["tasks"][0]["task_id"], "task-fns")
|
||||
self.assertEqual(
|
||||
enqueue_mock.call_args.kwargs["task_name"],
|
||||
"apps.parsers.tasks.sync_fns_financial_reports",
|
||||
)
|
||||
self.assertEqual(
|
||||
enqueue_mock.call_args.kwargs["kwargs"],
|
||||
{"requested_by_id": 12},
|
||||
)
|
||||
|
||||
@patch(
|
||||
"apps.parsers.source_cards.SourceCardService._enqueue_task",
|
||||
return_value={
|
||||
|
||||
Reference in New Issue
Block a user