def test_stream_encode(self): """ Check encoding an assoc_rq produces the correct output """ pdu = A_ASSOCIATE_RQ() pdu.Decode(a_associate_rq) s = pdu.Encode() self.assertEqual(s, a_associate_rq)
def test_generic_encode(self): """ Check using the new pdu.encode produces the correct output """ pdu = A_ASSOCIATE_RQ() pdu.Decode(a_associate_rq) s = pdu.Encode() t = pdu.encode() self.assertEqual(s, t)