def testTftpPacketDAT(self):
    log.debug('===> Running testcase testTftpPacketDAT')
    dat = tftpy.TftpPacketDAT()
    dat.blocknumber = 5
    data = 'this is some data'
    dat.data = data
    dat.encode()
    self.assert_((dat.buffer != None), 'Buffer populated')
    dat.decode()
    self.assertEqual(dat.opcode, 3, 'DAT opcode is correct')
    self.assertEqual(dat.blocknumber, 5, 'Block number is correct')
    self.assertEqual(dat.data, data, 'DAT data is correct')
def testTftpPacketDAT(self):
    log.debug('===> Running testcase testTftpPacketDAT')
    dat = tftpy.TftpPacketDAT()
    dat.blocknumber = 5
    data = 'this is some data'
    dat.data = data
    dat.encode()
    self.assert_((dat.buffer != None), 'Buffer populated')
    dat.decode()
    self.assertEqual(dat.opcode, 3, 'DAT opcode is correct')
    self.assertEqual(dat.blocknumber, 5, 'Block number is correct')
    self.assertEqual(dat.data, data, 'DAT data is correct')