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 9
9
"""
10
10
11
11
import json
12
+ import time
12
13
from unittest .mock import patch
13
14
from uuid import uuid4
14
15
@@ -58,11 +59,11 @@ def mock_founders_result():
58
59
return {
59
60
"founders" : [
60
61
{
61
- "name" : "Marco Perini " ,
62
+ "name" : "Marco Vinci " ,
62
63
"title" : "Co-founder & CEO" ,
63
64
"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 " ,
66
67
},
67
68
{
68
69
"name" : "Lorenzo Padoan" ,
@@ -441,7 +442,7 @@ def test_crawl_polling_with_timing(
441
442
442
443
# Simulate the polling loop from crawl_example.py
443
444
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
445
446
result = client .get_crawl (crawl_id )
446
447
if result .get ("status" ) == "success" and result .get ("result" ):
447
448
# 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