예제 #1
0
파일: test_sol.py 프로젝트: kruser/zualoo
    def test_header(self):
        bytes = "\x00\xbf\x00\x00\x00\x15TCSO\x00\x04\x00\x00\x00\x00\x00\x05hello\x00\x00\x00\x00"

        try:
            sol.decode(bytes)
        except:
            self.fail("Error occurred during decoding stream")
예제 #2
0
파일: test_sol.py 프로젝트: kruser/zualoo
    def test_strict_header_length(self):
        bytes = "\x00\xbf\x00\x00\x00\x00TCSO\x00\x04\x00\x00\x00\x00\x00\x05hello\x00\x00\x00\x00"

        try:
            sol.decode(bytes, strict=False)
        except:
            self.fail("Error occurred during decoding stream")
예제 #3
0
    def test_strict_header_length(self):
        bytes = '\x00\xbf\x00\x00\x00\x00TCSO\x00\x04\x00\x00\x00\x00\x00\x05hello\x00\x00\x00\x00'

        try:
            sol.decode(bytes, strict=False)
        except:
            self.fail("Error occurred during decoding stream")
예제 #4
0
    def test_header(self):
        bytes = '\x00\xbf\x00\x00\x00\x15TCSO\x00\x04\x00\x00\x00\x00\x00\x05hello\x00\x00\x00\x00'

        try:
            sol.decode(bytes)
        except:
            self.fail("Error occurred during decoding stream")
예제 #5
0
    def test_header(self):
        bytes = '\x00\xbf\x00\x00\x00\x15TCSO\x00\x04\x00\x00\x00\x00\x00\x05hello\x00\x00\x00\x00'

        try:
            sol.decode(bytes)
        except:
            raise
            self.fail("Error decoding stream")
예제 #6
0
    def test_header(self):
        bytes = '\x00\xbf\x00\x00\x00\x15TCSO\x00\x04\x00\x00\x00\x00\x00\x05hello\x00\x00\x00\x00'

        try:
            sol.decode(bytes)
        except:
            raise
            self.fail("Error decoding stream")
예제 #7
0
파일: test_sol.py 프로젝트: cardmagic/PyAMF
    def test_amf3(self):
        bytes = '\x00\xbf\x00\x00\x00aTCSO\x00\x04\x00\x00\x00\x00\x00\x08' + \
            'EchoTest\x00\x00\x00\x03\x0fhttpUri\x06=http://localhost:8000' + \
            '/gateway/\x00\x0frtmpUri\x06+rtmp://localhost/echo\x00'

        self.assertEquals(sol.decode(bytes), (u'EchoTest',
            {u'httpUri': u'http://localhost:8000/gateway/', u'rtmpUri': u'rtmp://localhost/echo'}))
예제 #8
0
    def test_amf3(self):
        bytes = '\x00\xbf\x00\x00\x00aTCSO\x00\x04\x00\x00\x00\x00\x00\x08' + \
            'EchoTest\x00\x00\x00\x03\x0fhttpUri\x06=http://localhost:8000' + \
            '/gateway/\x00\x0frtmpUri\x06+rtmp://localhost/echo\x00'

        self.assertEquals(sol.decode(bytes), (u'EchoTest',
            {u'httpUri': u'http://localhost:8000/gateway/', u'rtmpUri': u'rtmp://localhost/echo'}))
예제 #9
0
    def test_amf3(self):
        bytes = (
            '\x00\xbf\x00\x00\x00aTCSO\x00\x04\x00\x00\x00\x00\x00\x08'
            'EchoTest\x00\x00\x00\x03\x0fhttpUri\x06=http://localhost:8000'
            '/gateway/\x00\x0frtmpUri\x06+rtmp://localhost/echo\x00')

        self.assertEqual(sol.decode(bytes), ('EchoTest', {
            'httpUri': 'http://localhost:8000/gateway/',
            'rtmpUri': 'rtmp://localhost/echo'
        }))
예제 #10
0
파일: test_sol.py 프로젝트: kruser/zualoo
    def test_amf3(self):
        bytes = (
            "\x00\xbf\x00\x00\x00aTCSO\x00\x04\x00\x00\x00\x00\x00\x08"
            + "EchoTest\x00\x00\x00\x03\x0fhttpUri\x06=http://localhost:8000"
            + "/gateway/\x00\x0frtmpUri\x06+rtmp://localhost/echo\x00"
        )

        self.assertEquals(
            sol.decode(bytes),
            (u"EchoTest", {u"httpUri": u"http://localhost:8000/gateway/", u"rtmpUri": u"rtmp://localhost/echo"}),
        )