@@ -29,7 +29,6 @@ def test_image_indexing(reset: None) -> None:
29
29
test_file_dir = "tests/integration/common_utils/test_data"
30
30
os .makedirs (test_file_dir , exist_ok = True )
31
31
test_file_path = os .path .join (test_file_dir , "sample.pdf" )
32
- print (f"Using test file: { test_file_path } " )
33
32
34
33
# Use our fixed upload_file function to upload the test file
35
34
file_name = "sample.pdf"
@@ -41,15 +40,14 @@ def test_image_indexing(reset: None) -> None:
41
40
name = "test_llm" ,
42
41
user_performing_action = admin_user ,
43
42
)
44
- print ( "Created LLM provider" )
43
+
45
44
SettingsManager .update_settings (
46
45
DATestSettings (
47
46
search_time_image_analysis_enabled = True ,
48
47
image_extraction_and_analysis_enabled = True ,
49
48
)
50
49
)
51
50
52
- print (f"File upload response: { upload_response } " )
53
51
file_paths = upload_response .get ("file_paths" , [])
54
52
55
53
if not file_paths :
@@ -62,11 +60,6 @@ def test_image_indexing(reset: None) -> None:
62
60
user_performing_action = admin_user ,
63
61
)
64
62
65
- print ("Created credential" )
66
-
67
- print ("Creating connector" )
68
- print ("file_paths: " , file_paths )
69
- print ({"file_locations" : file_paths })
70
63
# Create the connector
71
64
connector_name = f"FileConnector-{ int (datetime .now ().timestamp ())} "
72
65
connector = ConnectorManager .create (
@@ -79,8 +72,6 @@ def test_image_indexing(reset: None) -> None:
79
72
user_performing_action = admin_user ,
80
73
)
81
74
82
- print (f"Created connector with ID: { connector .id } " )
83
-
84
75
# Link the credential to the connector
85
76
cc_pair = CCPairManager .create (
86
77
credential_id = credential .id ,
@@ -89,8 +80,6 @@ def test_image_indexing(reset: None) -> None:
89
80
user_performing_action = admin_user ,
90
81
)
91
82
92
- print (f"Created CC pair with ID: { cc_pair .id } " )
93
-
94
83
# Explicitly run the connector to start indexing
95
84
CCPairManager .run_once (
96
85
cc_pair = cc_pair ,
@@ -103,25 +92,16 @@ def test_image_indexing(reset: None) -> None:
103
92
user_performing_action = admin_user ,
104
93
)
105
94
106
- print ("Started indexing" )
107
-
108
- # Give the system some time to index the document
109
- print ("Sleeping for 15 seconds to allow indexing to progress..." )
110
-
111
95
# Create a chat session and ask about dogs
112
- print ("Creating chat session to ask about dogs..." )
113
96
chat_session : DATestChatSession = ChatSessionManager .create (
114
97
user_performing_action = admin_user
115
98
)
116
99
117
100
# Ask about dogs in the document
118
- response = ChatSessionManager .send_message (
101
+ ChatSessionManager .send_message (
119
102
chat_session_id = chat_session .id ,
120
103
message = "How many dogs?" ,
121
104
user_performing_action = admin_user ,
122
105
)
123
106
124
- print (f"Response to 'How many dogs?': { response } " )
125
-
126
107
# Test passed if we were able to complete the workflow
127
- print ("Test successful - file uploaded and chat query completed" )
0 commit comments