@@ -53,7 +53,7 @@ def check_ds_created(ds, mock_post, url):
53
53
self ._compare_ds (ds , example_ds )
54
54
args , kwargs = mock_post .call_args
55
55
56
- assert kwargs ['headers' ] == {'Authorization' : 'Bearer ' + API_KEY }
56
+ assert kwargs ['headers' ] == {'Authorization' : 'Bearer ' + API_KEY , 'Content-Type' : 'application/json' }
57
57
assert kwargs ['json' ] == example_ds .model_dump ()
58
58
assert args [0 ] == url
59
59
@@ -142,14 +142,15 @@ def test_create_knowledge_bases(self, mock_post, mock_get):
142
142
143
143
args , kwargs = mock_post .call_args
144
144
145
- assert kwargs ['headers' ] == {'Authorization' : 'Bearer ' + API_KEY }
145
+ assert kwargs ['headers' ] == {'Authorization' : 'Bearer ' + API_KEY , 'Content-Type' : 'application/json' }
146
146
147
147
expected_create_request = {
148
148
'name' : test_knowledge_base_config .name ,
149
149
'description' : test_knowledge_base_config .description ,
150
150
'vector_store' : {
151
151
'engine' : test_vector_store_config .engine ,
152
- 'connection_data' : test_vector_store_config .connection_data
152
+ 'connection_data' : test_vector_store_config .connection_data ,
153
+ 'table' : test_vector_store_config .table
153
154
},
154
155
'embedding_model' : {
155
156
'provider' : test_embedding_config .provider ,
@@ -443,3 +444,8 @@ def openai_completion_f(messages, *args, **kwargs):
443
444
if question == chunk .content .lower ():
444
445
success = True
445
446
assert success is True
447
+
448
+
449
+ if __name__ == '__main__' :
450
+ import pytest
451
+ pytest .main ()
0 commit comments