|
10 | 10 | data_matcher, |
11 | 11 | enumerate_async, |
12 | 12 | mock_route, |
| 13 | + param_matcher, |
13 | 14 | request_id_matcher, |
14 | 15 | ) |
15 | 16 |
|
@@ -70,8 +71,11 @@ async def test_get_sections( |
70 | 71 | url=endpoint, |
71 | 72 | json=page, |
72 | 73 | status=200, |
73 | | - params={"cursor": cursor} if cursor else {}, |
74 | | - matchers=[auth_matcher(), request_id_matcher()], |
| 74 | + matchers=[ |
| 75 | + auth_matcher(), |
| 76 | + request_id_matcher(), |
| 77 | + param_matcher({"cursor": cursor} if cursor else {}), |
| 78 | + ], |
75 | 79 | ) |
76 | 80 | cursor = page["next_cursor"] |
77 | 81 |
|
@@ -111,10 +115,12 @@ async def test_get_sections_by_project( |
111 | 115 | url=endpoint, |
112 | 116 | json=page, |
113 | 117 | status=200, |
114 | | - params={"project_id": project_id} | ({"cursor": cursor} if cursor else {}), |
115 | 118 | matchers=[ |
116 | 119 | auth_matcher(), |
117 | 120 | request_id_matcher(), |
| 121 | + param_matcher( |
| 122 | + {"project_id": project_id} | ({"cursor": cursor} if cursor else {}) |
| 123 | + ), |
118 | 124 | ], |
119 | 125 | ) |
120 | 126 | cursor = page["next_cursor"] |
@@ -155,10 +161,12 @@ async def test_search_sections( |
155 | 161 | url=endpoint, |
156 | 162 | json=page, |
157 | 163 | status=200, |
158 | | - params={"query": query} | ({"cursor": cursor} if cursor else {}), |
159 | 164 | matchers=[ |
160 | 165 | auth_matcher(), |
161 | 166 | request_id_matcher(), |
| 167 | + param_matcher( |
| 168 | + {"query": query} | ({"cursor": cursor} if cursor else {}) |
| 169 | + ), |
162 | 170 | ], |
163 | 171 | ) |
164 | 172 | cursor = page["next_cursor"] |
@@ -200,11 +208,13 @@ async def test_search_sections_by_project( |
200 | 208 | url=endpoint, |
201 | 209 | json=page, |
202 | 210 | status=200, |
203 | | - params={"query": query, "project_id": project_id} |
204 | | - | ({"cursor": cursor} if cursor else {}), |
205 | 211 | matchers=[ |
206 | 212 | auth_matcher(), |
207 | 213 | request_id_matcher(), |
| 214 | + param_matcher( |
| 215 | + {"query": query, "project_id": project_id} |
| 216 | + | ({"cursor": cursor} if cursor else {}) |
| 217 | + ), |
208 | 218 | ], |
209 | 219 | ) |
210 | 220 | cursor = page["next_cursor"] |
|
0 commit comments