Esempio n. 1
0
 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')
Esempio n. 2
0
 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'
Esempio n. 3
0
 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")
Esempio n. 4
0
 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'
Esempio n. 5
0
 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')