File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change 99"""
1010
1111import json
12+ import time
1213from unittest .mock import patch
1314from uuid import uuid4
1415
@@ -58,11 +59,11 @@ def mock_founders_result():
5859 return {
5960 "founders" : [
6061 {
61- "name" : "Marco Perini " ,
62+ "name" : "Marco Vinci " ,
6263 "title" : "Co-founder & CEO" ,
6364 "bio" : "AI researcher and entrepreneur" ,
64- "linkedin" : "https://linkedin.com/in/marco-perini " ,
65- "twitter" : "https://twitter.com/marco_perini " ,
65+ "linkedin" : "https://linkedin.com/in/marco-vinci " ,
66+ "twitter" : "https://twitter.com/marco_vinci " ,
6667 },
6768 {
6869 "name" : "Lorenzo Padoan" ,
@@ -441,7 +442,7 @@ def test_crawl_polling_with_timing(
441442
442443 # Simulate the polling loop from crawl_example.py
443444 for i in range (60 ): # Same as in the example
444- # time.sleep(5) - mocked out
445+ time .sleep (5 ) # This will be mocked out
445446 result = client .get_crawl (crawl_id )
446447 if result .get ("status" ) == "success" and result .get ("result" ):
447448 # Verify successful completion
Original file line number Diff line number Diff line change 1+ """
2+ Utility functions for tests
3+ """
4+ import uuid
5+
6+
7+ def generate_mock_api_key () -> str :
8+ """Generate a mock API key for testing purposes"""
9+ # Generate a realistic looking API key format: sgai-{uuid}
10+ mock_uuid = str (uuid .uuid4 ()).replace ('-' , '' )
11+ return f"sgai-{ mock_uuid } "
You can’t perform that action at this time.
0 commit comments