@@ -17,7 +17,11 @@ def test_simple_transformer(resources: Dict[str, Any]) -> None:
1717 "table_name" : "collection" ,
1818 "primary_key" : "id" ,
1919 "write_disposition" : "merge" ,
20- "endpoint" : {"data_selector" : "$" , "path" : "/collection/" },
20+ "endpoint" : {
21+ "data_selector" : "$" ,
22+ "path" : "/collection/" ,
23+ "paginator" : "auto" ,
24+ },
2125 }
2226 assert resources ["single_collection" ] == {
2327 "name" : "single_collection" ,
@@ -26,6 +30,7 @@ def test_simple_transformer(resources: Dict[str, Any]) -> None:
2630 "write_disposition" : "merge" ,
2731 "endpoint" : {
2832 "data_selector" : "$" ,
33+ "paginator" : "auto" ,
2934 "path" : "/collection/{collection_id}" ,
3035 "params" : {"collection_id" : {"type" : "resolve" , "resource" : "collections" , "field" : "id" }},
3136 },
@@ -47,7 +52,7 @@ def test_simple_transformer_with_deselected_parent() -> None:
4752 "primary_key" : "id" ,
4853 "write_disposition" : "merge" ,
4954 "selected" : False ,
50- "endpoint" : {"data_selector" : "$" , "path" : "/collection/" },
55+ "endpoint" : {"data_selector" : "$" , "path" : "/collection/" , "paginator" : "auto" },
5156 }
5257 assert resources ["single_collection" ] == {
5358 "name" : "single_collection" ,
@@ -58,6 +63,7 @@ def test_simple_transformer_with_deselected_parent() -> None:
5863 "data_selector" : "$" ,
5964 "path" : "/collection/{collection_id}" ,
6065 "params" : {"collection_id" : {"type" : "resolve" , "resource" : "collections" , "field" : "id" }},
66+ "paginator" : "auto" ,
6167 },
6268 }
6369
@@ -68,7 +74,7 @@ def test_match_by_path_var_only(resources: Dict[str, Any]) -> None:
6874 "table_name" : "user" ,
6975 "primary_key" : "user_id" ,
7076 "write_disposition" : "merge" ,
71- "endpoint" : {"data_selector" : "$" , "path" : "/users/" },
77+ "endpoint" : {"data_selector" : "$" , "path" : "/users/" , "paginator" : "auto" },
7278 }
7379 assert resources ["single_user" ] == {
7480 "name" : "single_user" ,
@@ -77,6 +83,7 @@ def test_match_by_path_var_only(resources: Dict[str, Any]) -> None:
7783 "write_disposition" : "merge" ,
7884 "endpoint" : {
7985 "data_selector" : "$" ,
86+ "paginator" : "auto" ,
8087 "path" : "/users/{user_id}" ,
8188 "params" : {"user_id" : {"type" : "resolve" , "resource" : "users" , "field" : "user_id" }},
8289 },
@@ -89,16 +96,23 @@ def test_match_singularized_path(resources: Dict[str, Any]) -> None:
8996 "table_name" : "invoice" ,
9097 "primary_key" : "invoice_id" ,
9198 "write_disposition" : "merge" ,
92- "endpoint" : {"data_selector" : "$" , "path" : "/invoices/" },
99+ "endpoint" : {"data_selector" : "$" , "path" : "/invoices/" , "paginator" : "auto" },
93100 }
94101 assert resources ["single_invoice" ] == {
95102 "name" : "single_invoice" ,
96103 "table_name" : "invoice" ,
97104 "primary_key" : "invoice_id" ,
98105 "write_disposition" : "merge" ,
99106 "endpoint" : {
107+ "paginator" : "auto" ,
100108 "data_selector" : "$" ,
101109 "path" : "/invoice/{invoice_id}" ,
102- "params" : {"invoice_id" : {"type" : "resolve" , "resource" : "invoices" , "field" : "invoice_id" }},
110+ "params" : {
111+ "invoice_id" : {
112+ "type" : "resolve" ,
113+ "resource" : "invoices" ,
114+ "field" : "invoice_id" ,
115+ }
116+ },
103117 },
104118 }
0 commit comments