def test_inbound_body(self): m = Message() m.body_size = 16 m.body_received = 8 m._pending_chunks = [b'the', b'quick'] m.inbound_body(b'brown') assert not m.ready m.inbound_body(b'fox') assert m.ready assert m.body == b'thequickbrownfox'
def test_inbound_body(self): m = Message() m.body_size = 16 m.body_received = 8 m._pending_chunks = [b'the', b'quick'] m.inbound_body(b'brown') self.assertFalse(m.ready) m.inbound_body(b'fox') self.assertTrue(m.ready) self.assertEqual(m.body, b'thequickbrownfox')
def test_inbound_body(self): m = Message() m.body_size = 16 m.body_received = 8 m._pending_chunks = [b"the", b"quick"] m.inbound_body(b"brown") self.assertFalse(m.ready) m.inbound_body(b"fox") self.assertTrue(m.ready) self.assertEqual(m.body, b"thequickbrownfox")
def test_inbound_body__no_chunks(self): m = Message() m.body_size = 16 m.inbound_body('thequickbrownfox') self.assertTrue(m.ready)
def test_inbound_body__no_chunks(self): m = Message() m.body_size = 16 m.inbound_body('thequickbrownfox') assert m.ready
def test_inbound_body__no_chunks(self): m = Message() m.body_size = 16 m.inbound_body("thequickbrownfox") self.assertTrue(m.ready)