Mercurial > p > roundup > code
comparison test/test_postgresql.py @ 8438:98e17dd0197f
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.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Thu, 28 Aug 2025 12:39:38 -0400 |
| parents | 673bb9cb41b4 |
| children |
comparison
equal
deleted
inserted
replaced
| 8437:b57cdcfe46d6 | 8438:98e17dd0197f |
|---|
