Exemplo n.º 1
0
    def test_new_encode(self):
        """ Check encoding using new generic method """
        pdu = A_RELEASE_RP()
        pdu.Decode(a_release_rp)
        s = pdu.encode()

        self.assertEqual(s, a_release_rp)
Exemplo n.º 2
0
    def test_generic_encode(self):
        """ Check using the new pdu.encode produces the correct output """
        pdu = A_RELEASE_RP()
        pdu.Decode(a_release_rp)
        s = pdu.Encode()
        t = pdu.encode()

        self.assertEqual(s, t)
Exemplo n.º 3
0
    def test_encode(self):
        """ Check encoding an release_rp produces the correct output """
        pdu = A_RELEASE_RP()
        pdu.decode(a_release_rp)

        assert pdu.encode() == a_release_rp