MCPcopy Create free account
hub / github.com/grapeot/devin.cursorrules / test_process_urls

Method test_process_urls

tests/test_web_scraper.py:98–106  ·  view source on GitHub ↗

Test processing multiple URLs concurrently.

(self)

Source from the content-addressed store, hash-verified

96 self.mock_session.get.assert_called_once_with("http://example.com")
97
98 async def test_process_urls(self):
99 """Test processing multiple URLs concurrently."""
100 with patch('aiohttp.ClientSession') as mock_session:
101 mock_session.return_value = self.mock_client_session
102 results = await process_urls(self.urls, max_concurrent=2)
103 self.assertEqual(len(results), 2)
104 self.assertEqual(results[0], "Test content")
105 self.assertEqual(results[1], "Test content")
106 self.assertEqual(self.mock_session.get.call_count, 2)
107
108if __name__ == '__main__':
109 unittest.main()

Callers

nothing calls this directly

Calls 1

process_urlsFunction · 0.90

Tested by

no test coverage detected