2081
2089
That is, return a protocol object that is waiting to receive a body.
2085
2092
headers = '\0\0\0\x02de' # length-prefixed, bencoded empty dict
2086
2093
args = '\0\0\0\x07l3:ARGe' # length-prefixed, bencoded list: ['ARG']
2087
2094
request_bytes = headers + args
2089
2097
smart_protocol.accept_bytes(request_bytes)
2092
2100
def assertBodyParsingBehaviour(self, calls, protocol_bytes):
2093
2101
"""Assert that the given bytes cause an exact sequence of calls to the
2096
2105
smart_protocol = self.make_protocol_expecting_body()
2097
2106
smart_protocol.request_handler = InstrumentedRequestHandler()
2098
2107
smart_protocol.accept_bytes(protocol_bytes)