Commit 2bdcc6b
committed
test - fix parsing of integer param values
CI broke on the string '1\r#' expecting a 400 but got a 200 in
test_element_url_param_accepting_integer_values().
The #, & characters mark a url fragment or start of another parameter
and not part of the value. In a couple of tests, I parse the
hypothesis generated value to remove a # or & and anything after. Then
I set the value to the preceding string. If the string starts with #
or &, the value is set to "0" as the server ignores the parameter and
returns 200. "0" is a value that asserts that status is 200.
The code doing this parsing was different (and broken) between
test_element_url_param_accepting_integer_values
and
test_class_url_param_accepting_integer_values
It's now consistent and if it finds a & or #, it actually tests the
resulting value/status rather than skipping the test.1 parent 8547740 commit 2bdcc6b
1 file changed
+22
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
| 259 | + | |
259 | 260 | | |
260 | 261 | | |
261 | 262 | | |
| |||
271 | 272 | | |
272 | 273 | | |
273 | 274 | | |
274 | | - | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
275 | 279 | | |
276 | 280 | | |
277 | | - | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
278 | 287 | | |
279 | 288 | | |
280 | 289 | | |
| |||
285 | 294 | | |
286 | 295 | | |
287 | 296 | | |
| 297 | + | |
288 | 298 | | |
289 | 299 | | |
290 | 300 | | |
| |||
298 | 308 | | |
299 | 309 | | |
300 | 310 | | |
301 | | - | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
302 | 315 | | |
303 | 316 | | |
304 | | - | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
305 | 323 | | |
306 | 324 | | |
307 | 325 | | |
| |||
0 commit comments