\ This skips the sizes checks as we don't implement it.
(self, req, body, sizes)
| 209 | raise AssertionError("Read data after body finished: %r" % data) |
| 210 | |
| 211 | def match_readlines(self, req, body, sizes): |
| 212 | """\ |
| 213 | This skips the sizes checks as we don't implement it. |
| 214 | """ |
| 215 | data = req.body.readlines() |
| 216 | for line in data: |
| 217 | if b'\n' in line[:-1]: |
| 218 | raise AssertionError("Embedded new line: %r" % line) |
| 219 | if line != body[:len(line)]: |
| 220 | raise AssertionError("Invalid body data read: %r != %r" % ( |
| 221 | line, body[:len(line)])) |
| 222 | body = body[len(line):] |
| 223 | if body: |
| 224 | raise AssertionError("Failed to read entire body: %r" % body) |
| 225 | data = req.body.readlines(sizes()) |
| 226 | if data: |
| 227 | raise AssertionError("Read data after body finished: %r" % data) |
| 228 | |
| 229 | def match_iter(self, req, body, sizes): |
| 230 | """\ |