コード例 #1
0
ファイル: TestAMFWithSamples.py プロジェクト: iambus/PyLoad
	def runEncoderDecoderXML(self, sample):
		decoder = AMFDecoder(sample)
		packet = decoder.decode()
		toxml = ToXML(packet)
		xml = toxml.get_xml()
		fromxml = FromXML(xml)
		new_packet = fromxml.get_packet()
		encoder = AMFEncoder(new_packet)
		result = encoder.encode()

		self.assertRawPacketEqual(sample, result)
コード例 #2
0
ファイル: TestAMFWithSamples.py プロジェクト: iambus/PyLoad
    def runEncoderDecoderXML(self, sample):
        decoder = AMFDecoder(sample)
        packet = decoder.decode()
        toxml = ToXML(packet)
        xml = toxml.get_xml()
        fromxml = FromXML(xml)
        new_packet = fromxml.get_packet()
        encoder = AMFEncoder(new_packet)
        result = encoder.encode()

        self.assertRawPacketEqual(sample, result)
コード例 #3
0
ファイル: TestAMFWithSamples.py プロジェクト: iambus/PyLoad
	def runEncoderDecoderXML2(self, sample):
		decoder = AMFDecoder(sample)
		packet = decoder.decode()
		toxml = ToXML(packet)
		xml = toxml.get_xml()
		fromxml = FromXML(xml)
		new_packet = fromxml.get_packet()
		encoder = AMFEncoder(new_packet)
		sample2 = encoder.encode()

		decoder = AMFDecoder(sample2)
		packet = decoder.decode()
		toxml = ToXML(packet)
		xml = toxml.get_xml()
		fromxml = FromXML(xml)
		new_packet = fromxml.get_packet()
		encoder = AMFEncoder(new_packet)
		sample3 = encoder.encode()

		self.assertEqual(sample2, sample3)
コード例 #4
0
ファイル: TestAMFWithSamples.py プロジェクト: iambus/PyLoad
    def runEncoderDecoderXML2(self, sample):
        decoder = AMFDecoder(sample)
        packet = decoder.decode()
        toxml = ToXML(packet)
        xml = toxml.get_xml()
        fromxml = FromXML(xml)
        new_packet = fromxml.get_packet()
        encoder = AMFEncoder(new_packet)
        sample2 = encoder.encode()

        decoder = AMFDecoder(sample2)
        packet = decoder.decode()
        toxml = ToXML(packet)
        xml = toxml.get_xml()
        fromxml = FromXML(xml)
        new_packet = fromxml.get_packet()
        encoder = AMFEncoder(new_packet)
        sample3 = encoder.encode()

        self.assertEqual(sample2, sample3)
コード例 #5
0
ファイル: Coder.py プロジェクト: iambus/PyLoad
 def decode(cls, raw):
     decoder = AMFDecoder(raw)
     packet = decoder.decode()
     toxml = ToXML(packet)
     return toxml.get_xml()
コード例 #6
0
ファイル: Coder.py プロジェクト: iambus/PyLoad
	def decode(cls, raw):
		decoder = AMFDecoder(raw)
		packet = decoder.decode()
		toxml = ToXML(packet)
		return toxml.get_xml()