def testTftpPacketERR(self):
    log.debug('===> Running testcase testTftpPacketERR')
    err = tftpy.TftpPacketERR()
    err.errorcode = 4
    err.encode()
    self.assert_((err.buffer != None), 'Buffer populated')
    err.decode()
    self.assertEqual(err.opcode, 5, 'ERR opcode is correct')
    self.assertEqual(err.errorcode, 4, 'ERR errorcode is correct')
def testTftpPacketERR(self):
    log.debug('===> Running testcase testTftpPacketERR')
    err = tftpy.TftpPacketERR()
    err.errorcode = 4
    err.encode()
    self.assert_((err.buffer != None), 'Buffer populated')
    err.decode()
    self.assertEqual(err.opcode, 5, 'ERR opcode is correct')
    self.assertEqual(err.errorcode, 4, 'ERR errorcode is correct')