1818environment_id = 'envid'
1919collection_id = 'collid'
2020
21+
2122@responses .activate
2223def test_environments ():
2324 discovery_url = urljoin (base_discovery_url , 'environments' )
@@ -218,10 +219,12 @@ def test_collection():
218219 discovery .create_collection (environment_id = 'envid' ,
219220 name = "name" ,
220221 description = "" ,
222+ language = "" ,
221223 configuration_id = 'confid' )
222224
223225 discovery .create_collection (environment_id = 'envid' ,
224226 name = "name" ,
227+ language = "es" ,
225228 description = "" )
226229
227230 discovery .get_collection ('envid' , 'collid' )
@@ -326,8 +329,8 @@ def test_document():
326329 content_type = 'application/json' )
327330 responses .add (responses .GET , config_url ,
328331 body = json .dumps ({"configurations" :
329- [{"name" : "Default Configuration" ,
330- "configuration_id" : "confid" }]}),
332+ [{"name" : "Default Configuration" ,
333+ "configuration_id" : "confid" }]}),
331334 status = 200 ,
332335 content_type = 'application/json' )
333336
@@ -532,7 +535,8 @@ def test_add_training_data_query():
532535def test_delete_training_data_query ():
533536 training_endpoint = '/v1/environments/{0}/collections/{1}/training_data/{2}'
534537 query_id = 'queryid'
535- endpoint = training_endpoint .format (environment_id , collection_id , query_id )
538+ endpoint = training_endpoint .format (
539+ environment_id , collection_id , query_id )
536540 url = '{0}{1}' .format (base_url , endpoint )
537541 responses .add (responses .DELETE , url , status = 204 )
538542
@@ -550,7 +554,8 @@ def test_delete_training_data_query():
550554def test_get_training_data_query ():
551555 training_endpoint = '/v1/environments/{0}/collections/{1}/training_data/{2}'
552556 query_id = 'queryid'
553- endpoint = training_endpoint .format (environment_id , collection_id , query_id )
557+ endpoint = training_endpoint .format (
558+ environment_id , collection_id , query_id )
554559 url = '{0}{1}' .format (base_url , endpoint )
555560 mock_response = {
556561 "query_id" : "string" ,
@@ -585,7 +590,8 @@ def test_list_training_data_query_examples():
585590 examples_endpoint = '/v1/environments/{0}/collections/{1}/training_data' + \
586591 '/{2}/examples'
587592 query_id = 'queryid'
588- endpoint = examples_endpoint .format (environment_id , collection_id , query_id )
593+ endpoint = examples_endpoint .format (
594+ environment_id , collection_id , query_id )
589595 url = '{0}{1}' .format (base_url , endpoint )
590596 mock_response = [
591597 {
@@ -616,7 +622,8 @@ def test_add_training_data_query_example():
616622 examples_endpoint = '/v1/environments/{0}/collections/{1}/training_data' + \
617623 '/{2}/examples'
618624 query_id = 'queryid'
619- endpoint = examples_endpoint .format (environment_id , collection_id , query_id )
625+ endpoint = examples_endpoint .format (
626+ environment_id , collection_id , query_id )
620627 url = '{0}{1}' .format (base_url , endpoint )
621628 document_id = "string"
622629 relevance = 0
0 commit comments