@@ -134,32 +134,28 @@ async def test_respects_an_overly_large_last():
134
134
135
135
@mark .asyncio
136
136
async def test_respects_first_and_after ():
137
- await check (
138
- 'first: 2, after: "{}"' .format (cursor_for ("B" )), "CD" , has_next_page = True
139
- )
137
+ await check (f'first: 2, after: "{ cursor_for ("B" )} "' , "CD" , has_next_page = True )
140
138
141
139
142
140
@mark .asyncio
143
141
async def test_respects_first_and_after_with_long_first ():
144
- await check ('first: 10, after: "{}"' . format ( cursor_for ("B" )) , "CDE" )
142
+ await check (f 'first: 10, after: "{ cursor_for ("B" )} "' , "CDE" )
145
143
146
144
147
145
@mark .asyncio
148
146
async def test_respects_last_and_before ():
149
- await check (
150
- 'last: 2, before: "{}"' .format (cursor_for ("D" )), "BC" , has_previous_page = True
151
- )
147
+ await check (f'last: 2, before: "{ cursor_for ("D" )} "' , "BC" , has_previous_page = True )
152
148
153
149
154
150
@mark .asyncio
155
151
async def test_respects_last_and_before_with_long_last ():
156
- await check ('last: 10, before: "{}"' . format ( cursor_for ("D" )) , "ABC" )
152
+ await check (f 'last: 10, before: "{ cursor_for ("D" )} "' , "ABC" )
157
153
158
154
159
155
@mark .asyncio
160
156
async def test_respects_first_and_after_and_before_too_few ():
161
157
await check (
162
- 'first: 2, after: "{}", before: "{}"' . format ( cursor_for ("A" ), cursor_for ( " E" )) ,
158
+ f 'first: 2, after: "{ cursor_for ( "A" ) } ", before: "{ cursor_for ("E" )} "' ,
163
159
"BC" ,
164
160
has_next_page = True ,
165
161
)
@@ -168,23 +164,21 @@ async def test_respects_first_and_after_and_before_too_few():
168
164
@mark .asyncio
169
165
async def test_respects_first_and_after_and_before_too_many ():
170
166
await check (
171
- 'first: 4, after: "{}", before: "{}"' .format (cursor_for ("A" ), cursor_for ("E" )),
172
- "BCD" ,
167
+ f'first: 4, after: "{ cursor_for ("A" )} ", before: "{ cursor_for ("E" )} "' , "BCD" ,
173
168
)
174
169
175
170
176
171
@mark .asyncio
177
172
async def test_respects_first_and_after_and_before_exactly_right ():
178
173
await check (
179
- 'first: 3, after: "{}", before: "{}"' .format (cursor_for ("A" ), cursor_for ("E" )),
180
- "BCD" ,
174
+ f'first: 3, after: "{ cursor_for ("A" )} ", before: "{ cursor_for ("E" )} "' , "BCD" ,
181
175
)
182
176
183
177
184
178
@mark .asyncio
185
179
async def test_respects_last_and_after_and_before_too_few ():
186
180
await check (
187
- 'last: 2, after: "{}", before: "{}"' . format ( cursor_for ("A" ), cursor_for ( " E" )) ,
181
+ f 'last: 2, after: "{ cursor_for ( "A" ) } ", before: "{ cursor_for ("E" )} "' ,
188
182
"CD" ,
189
183
has_previous_page = True ,
190
184
)
@@ -193,16 +187,14 @@ async def test_respects_last_and_after_and_before_too_few():
193
187
@mark .asyncio
194
188
async def test_respects_last_and_after_and_before_too_many ():
195
189
await check (
196
- 'last: 4, after: "{}", before: "{}"' .format (cursor_for ("A" ), cursor_for ("E" )),
197
- "BCD" ,
190
+ f'last: 4, after: "{ cursor_for ("A" )} ", before: "{ cursor_for ("E" )} "' , "BCD" ,
198
191
)
199
192
200
193
201
194
@mark .asyncio
202
195
async def test_respects_last_and_after_and_before_exactly_right ():
203
196
await check (
204
- 'last: 3, after: "{}", before: "{}"' .format (cursor_for ("A" ), cursor_for ("E" )),
205
- "BCD" ,
197
+ f'last: 3, after: "{ cursor_for ("A" )} ", before: "{ cursor_for ("E" )} "' , "BCD" ,
206
198
)
207
199
208
200
@@ -219,19 +211,15 @@ async def test_returns_all_elements_if_cursors_are_invalid():
219
211
@mark .asyncio
220
212
async def test_returns_all_elements_if_cursors_are_on_the_outside ():
221
213
await check (
222
- 'before: "{}" after: "{}"' .format (
223
- base64 ("arrayconnection:%s" % 6 ), base64 ("arrayconnection:%s" % - 1 )
224
- ),
214
+ f'before: "{ base64 ("arrayconnection:%s" % 6 )} " after: "{ base64 ("arrayconnection:%s" % - 1 )} "' ,
225
215
"ABCDE" ,
226
216
)
227
217
228
218
229
219
@mark .asyncio
230
220
async def test_returns_no_elements_if_cursors_cross ():
231
221
await check (
232
- 'before: "{}" after: "{}"' .format (
233
- base64 ("arrayconnection:%s" % 2 ), base64 ("arrayconnection:%s" % 4 )
234
- ),
222
+ f'before: "{ base64 ("arrayconnection:%s" % 2 )} " after: "{ base64 ("arrayconnection:%s" % 4 )} "' ,
235
223
"" ,
236
224
)
237
225
0 commit comments