55from unstructured_client import UnstructuredClient
66from unstructured_client .models import shared , operations
77from unstructured_client .models .errors import SDKError
8- from unstructured_client .models .shared import DestinationConnectorType
9-
108
119
1210def test_list_destinations (
@@ -19,7 +17,14 @@ def test_list_destinations(
1917 headers = {"Content-Type" : "application/json" },
2018 json = [
2119 {
22- "config" : {},
20+ "config" : {
21+ "remote_url" : "s3://mock-s3-connector" ,
22+ "anonymous" : False ,
23+ "key" : "**********" ,
24+ "secret" : "**********" ,
25+ "token" : None ,
26+ "endpoint_url" : None ,
27+ },
2328 "created_at" : "2025-08-22T08:47:29.802Z" ,
2429 "id" : "0c363dec-3c70-45ee-8041-481044a6e1cc" ,
2530 "name" : "test_destination_name" ,
@@ -45,7 +50,7 @@ def test_list_destinations(
4550 assert destination .id == "0c363dec-3c70-45ee-8041-481044a6e1cc"
4651 assert destination .name == "test_destination_name"
4752 assert destination .type == "s3"
48- assert destination .config == {}
53+ assert isinstance ( destination .config , shared . S3DestinationConnectorConfig )
4954 assert destination .created_at == datetime .fromisoformat (
5055 "2025-08-22T08:47:29.802+00:00"
5156 )
@@ -115,7 +120,14 @@ def test_get_destination(httpx_mock, client: UnstructuredClient, platform_api_ur
115120 method = "GET" ,
116121 headers = {"Content-Type" : "application/json" },
117122 json = {
118- "config" : {},
123+ "config" : {
124+ "remote_url" : "s3://mock-s3-connector" ,
125+ "anonymous" : False ,
126+ "key" : "**********" ,
127+ "secret" : "**********" ,
128+ "token" : None ,
129+ "endpoint_url" : None ,
130+ },
119131 "created_at" : "2025-08-22T08:47:29.802Z" ,
120132 "id" : "0c363dec-3c70-45ee-8041-481044a6e1cc" ,
121133 "name" : "test_destination_name" ,
@@ -139,7 +151,7 @@ def test_get_destination(httpx_mock, client: UnstructuredClient, platform_api_ur
139151 assert destination .id == "0c363dec-3c70-45ee-8041-481044a6e1cc"
140152 assert destination .name == "test_destination_name"
141153 assert destination .type == "s3"
142- assert destination .config == {}
154+ assert isinstance ( destination .config , shared . S3DestinationConnectorConfig )
143155 assert destination .created_at == datetime .fromisoformat (
144156 "2025-08-22T08:47:29.802+00:00"
145157 )
@@ -178,7 +190,12 @@ def test_create_destination(
178190 method = "POST" ,
179191 headers = {"Content-Type" : "application/json" },
180192 json = {
181- "config" : {},
193+ "config" : {
194+ "remote_url" : "s3://mock-s3-connector" ,
195+ "key" : "blah" ,
196+ "secret" : "blah" ,
197+ "anonymous" : False ,
198+ },
182199 "created_at" : "2023-09-15T01:06:53.146Z" ,
183200 "id" : "b25d4161-77a0-4e08-b65e-86f398ce15ad" ,
184201 "name" : "test_destination_name" ,
@@ -191,8 +208,12 @@ def test_create_destination(
191208 request = operations .CreateDestinationRequest (
192209 create_destination_connector = shared .CreateDestinationConnector (
193210 name = "test_destination_name" ,
194- type = DestinationConnectorType .S3 ,
195- config = {},
211+ type = shared .DestinationConnectorType .S3 ,
212+ config = {
213+ "remote_url" : "s3://mock-s3-connector" ,
214+ "key" : "blah" ,
215+ "secret" : "blah" ,
216+ },
196217 )
197218 )
198219 )
@@ -208,7 +229,7 @@ def test_create_destination(
208229 assert destination .id == "b25d4161-77a0-4e08-b65e-86f398ce15ad"
209230 assert destination .name == "test_destination_name"
210231 assert destination .type == "s3"
211- assert destination .config == {}
232+ assert isinstance ( destination .config , shared . S3DestinationConnectorConfig )
212233 assert destination .created_at == datetime .fromisoformat (
213234 "2023-09-15T01:06:53.146+00:00"
214235 )
@@ -224,7 +245,12 @@ def test_update_destination(
224245 method = "PUT" ,
225246 headers = {"Content-Type" : "application/json" },
226247 json = {
227- "config" : {},
248+ "config" : {
249+ "remote_url" : "s3://mock-s3-connector" ,
250+ "key" : "blah" ,
251+ "secret" : "blah" ,
252+ "anonymous" : False ,
253+ },
228254 "created_at" : "2023-09-15T01:06:53.146Z" ,
229255 "id" : "b25d4161-77a0-4e08-b65e-86f398ce15ad" ,
230256 "name" : "test_destination_name" ,
@@ -237,7 +263,11 @@ def test_update_destination(
237263 request = operations .UpdateDestinationRequest (
238264 destination_id = dest_id ,
239265 update_destination_connector = shared .UpdateDestinationConnector (
240- config = {}
266+ config = {
267+ "remote_url" : "s3://mock-s3-connector" ,
268+ "key" : "blah" ,
269+ "secret" : "blah" ,
270+ },
241271 ),
242272 )
243273 )
@@ -254,7 +284,7 @@ def test_update_destination(
254284 assert updated_destination .id == "b25d4161-77a0-4e08-b65e-86f398ce15ad"
255285 assert updated_destination .name == "test_destination_name"
256286 assert updated_destination .type == "s3"
257- assert updated_destination .config == {}
287+ assert isinstance ( updated_destination .config , shared . S3DestinationConnectorConfig )
258288 assert updated_destination .created_at == datetime .fromisoformat (
259289 "2023-09-15T01:06:53.146+00:00"
260290 )
0 commit comments