Пример #1
0
 def verify_sent_messages(_result):
     self.assertErrorsMatch(muxer_messages(mux),
                            [(0, chunks.MSG_COMMAND, 0,
                              ['_error', 1.0, None,
                               ('NetConnection.Connect.Failed',
                                'error')],
                              False)])
Пример #2
0
 def verify_sent_messages(_result):
     msgs = muxer_messages(mux)
     self.assertEquals(msgs[0:1],
                       [(0, 6, 0, ['_result', 2.0, None, 1.0], False)])
     self.assertErrorsMatch(msgs[1:], [(0, chunks.MSG_COMMAND, 1, [
         '_error', 1.0, None, ('NetStream.Failed', 'error')
     ], False)])
Пример #3
0
 def verify_sent_messages(_result):
     msgs = muxer_messages(mux)
     self.assertEquals(msgs[0:1],
                       [(0, 6, 0, ['_result', 2.0, None, 1.0], False)])
     self.assertErrorsMatch(msgs[1:],
                            [(0, chunks.MSG_COMMAND, 1,
                              ['_error', 1.0, None,
                               ('NetStream.Failed', 'error')],
                              False)])
Пример #4
0
 def verify_sent_messages(_result):
     msgs = muxer_messages(mux)
     self.assertEquals(len(msgs), 4)
     self.assertEquals(msgs[0][1:3], (chunks.PROTO_WINDOW_SIZE, 0))
     self.assertEquals(msgs[1][1:3], (chunks.PROTO_SET_BANDWIDTH, 0))
     self.assertEquals(msgs[2][1:4], (chunks.PROTO_USER_CONTROL, 0,
                                      '000000000000'.decode('hex')))
     self.assertEquals(msgs[3][1:4], (chunks.MSG_COMMAND, 0,
                                      ['_result', 1.0, True, True]))
Пример #5
0
 def verify_sent_messages(_result):
     msgs = muxer_messages(mux)
     self.assertEquals(len(msgs), 4)
     self.assertEquals(msgs[0][1:3], (chunks.PROTO_WINDOW_SIZE, 0))
     self.assertEquals(msgs[1][1:3], (chunks.PROTO_SET_BANDWIDTH, 0))
     self.assertEquals(
         msgs[2][1:4],
         (chunks.PROTO_USER_CONTROL, 0, '000000000000'.decode('hex')))
     self.assertEquals(
         msgs[3][1:4],
         (chunks.MSG_COMMAND, 0, ['_result', 1.0, True, True]))
Пример #6
0
        def verify_sent_messages(_result):
            msgs = muxer_messages(mux)
            error_tuple = ('Artificially.Failed', 'error')

            self.assertEquals(len(msgs), 1)
            msg = msgs[0]

            self.assertEquals(msg[0:3] + msg[4:],
                              (0, chunks.MSG_COMMAND, 1, False))
            args = msg[3]
            self.assertEquals(len(args), 4)
            self.assertEquals(args[:3], ['_error', 0.0, None])
            self.assertIsInstance(args[3], Object)
            self.assertEquals((args[3].code, args[3].level), error_tuple)
Пример #7
0
        def verify_sent_messages(_result):
            msgs = muxer_messages(mux)
            error_tuple = ('Artificially.Failed', 'error')

            self.assertEquals(len(msgs), 1)
            msg = msgs[0]

            self.assertEquals(msg[0:3] + msg[4:],
                              (0, chunks.MSG_COMMAND, 1, False))
            args = msg[3]
            self.assertEquals(len(args), 4)
            self.assertEquals(args[:3], ['_error', 0.0, None])
            self.assertIsInstance(args[3], Object)
            self.assertEquals((args[3].code, args[3].level),
                              error_tuple)
Пример #8
0
 def verify_sent_messages(_result):
     msgs = muxer_messages(mux)
     self.assertEquals(msgs,
                       [(0, 6, 0, ['_result', 2.0, None, 1.0], False),
                        (0, 6, 1, ['onEcho', 0.0, 'abc'], False),
                        (0, 6, 1, ['_result', 1.0, 'abc'], False)])
Пример #9
0
 def verify_sent_messages(_result):
     self.assertErrorsMatch(muxer_messages(mux),
                            [(0, chunks.MSG_COMMAND, 1,
                              ['_error', 2.0, None,
                               ('NetStream.Failed', 'error')],
                              False)])
Пример #10
0
 def verify_sent_messages(_result):
     msgs = muxer_messages(mux)
     self.assertEquals(msgs, [])
Пример #11
0
 def verify_sent_messages(_result):
     msgs = muxer_messages(mux)
     self.assertEquals(msgs, [(0, 6, 1, ['_result', 1.0, None], False)])
Пример #12
0
 def verify_sent_messages(_result):
     msgs = muxer_messages(mux)
     self.assertEquals(msgs, [(0, 6, 1, ['_result', 1.0, None], False)])
Пример #13
0
 def verify_sent_messages(_result):
     msgs = muxer_messages(mux)
     self.assertEquals(msgs, [])
Пример #14
0
 def verify_sent_messages(_result):
     msgs = muxer_messages(mux)
     self.assertEquals(msgs,
                       [(0, 6, 0, ['_result', 2.0, None, 1.0], False),
                        (0, 6, 1, ['onEcho', 0.0, 'abc'], False),
                        (0, 6, 1, ['_result', 1.0, 'abc'], False)])
Пример #15
0
 def verify_sent_messages(_result):
     self.assertErrorsMatch(muxer_messages(mux),
                            [(0, chunks.MSG_COMMAND, 1, [
                                '_error', 2.0, None,
                                ('NetStream.Failed', 'error')
                            ], False)])
Пример #16
0
 def verify_sent_messages(_result):
     self.assertErrorsMatch(
         muxer_messages(mux), [(0, chunks.MSG_COMMAND, 0, [
             '_error', 1.0, None,
             ('NetConnection.Connect.Failed', 'error')
         ], False)])