File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -30,15 +30,17 @@ async def test_extract(self):
3030 "title" : "Example" ,
3131 }
3232 ]
33-
33+
3434 # Mock the CrawleeClient class instead of the instance
35- with patch ('hivemind_etl.website.website_etl.CrawleeClient' ) as MockCrawleeClient :
35+ with patch (
36+ "hivemind_etl.website.website_etl.CrawleeClient"
37+ ) as MockCrawleeClient :
3638 mock_client_instance = AsyncMock ()
3739 mock_client_instance .crawl .return_value = mocked_data
3840 MockCrawleeClient .return_value = mock_client_instance
39-
41+
4042 extracted_data = await self .website_etl .extract (urls )
41-
43+
4244 self .assertEqual (extracted_data , mocked_data )
4345 MockCrawleeClient .assert_called_once ()
4446 mock_client_instance .crawl .assert_awaited_once_with (links = urls )
You can’t perform that action at this time.
0 commit comments