Commit abb41b2
Refactor subscription case-preservation tests to parse XML
Copilot noted that substring-matching the serialized XML is brittle:
attribute quoting (single vs double), whitespace, and entity escaping
can vary without changing meaning. Parse the request with defusedxml
(matching the existing test_encoding_attr_capture style at line 361)
and assert on the parsed attribute value instead.
The load-bearing check is still "the value is not lowercased", which is
what site_elem.attrib["customSubscriptionEmail"] == "Sales@Company.com"
verifies. Test now survives serialization-format changes and still
fails if the .lower() regression comes back.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent a501ac7 commit abb41b2
1 file changed
Lines changed: 10 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
223 | 222 | | |
224 | 223 | | |
225 | 224 | | |
| |||
228 | 227 | | |
229 | 228 | | |
230 | 229 | | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
236 | 234 | | |
237 | 235 | | |
238 | 236 | | |
| |||
0 commit comments