def write(self, content):
    assert isinstance(content, bytes), ('Should be bytes! ' + repr(content))
    if ('body' not in self.result):
        self.result['body'] = b''
    self.result['body'] += content
def write(self, content):
    assert isinstance(content, bytes), ('Should be bytes! ' + repr(content))
    if ('body' not in self.result):
        self.result['body'] = b
    self.result['body'] += content