def test_rigged_body_test_partial(self): streamime = Streamime(self.boundary) streamime.stop_after = 1 streamime.push(self.f.read(180)) self.assertEqual("This is a stra", streamime.get_body())
def test_rigged_body_test(self): streamime = Streamime(self.boundary) streamime.stop_after = 1 streamime.push(self.f.read()) self.assertEqual("This is a straightforward test\ndocument which spans several lines.\n", streamime.last_body)