예제 #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')
     assert not m.ready
     m.inbound_body(b'fox')
     assert m.ready
     assert m.body == b'thequickbrownfox'
예제 #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')
     self.assertFalse(m.ready)
     m.inbound_body(b'fox')
     self.assertTrue(m.ready)
     self.assertEqual(m.body, b'thequickbrownfox')
예제 #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')
     assert not m.ready
     m.inbound_body(b'fox')
     assert m.ready
     assert m.body == b'thequickbrownfox'
예제 #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")
     self.assertFalse(m.ready)
     m.inbound_body(b"fox")
     self.assertTrue(m.ready)
     self.assertEqual(m.body, b"thequickbrownfox")
예제 #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')
예제 #6
0
 def test_inbound_body__no_chunks(self):
     m = Message()
     m.body_size = 16
     m.inbound_body('thequickbrownfox')
     self.assertTrue(m.ready)
예제 #7
0
 def test_inbound_body__no_chunks(self):
     m = Message()
     m.body_size = 16
     m.inbound_body('thequickbrownfox')
     assert m.ready
예제 #8
0
 def test_inbound_body__no_chunks(self):
     m = Message()
     m.body_size = 16
     m.inbound_body("thequickbrownfox")
     self.assertTrue(m.ready)