def testTftpPacketFactory(self):
    log.debug('===> Running testcase testTftpPacketFactory')
    classes = {1: tftpy.TftpPacketRRQ, 2: tftpy.TftpPacketWRQ, 3: tftpy.TftpPacketDAT, 4: tftpy.TftpPacketACK, 5: tftpy.TftpPacketERR, 6: tftpy.TftpPacketOACK}
    factory = tftpy.TftpPacketFactory()
    for opcode in classes:
        self.assert_(isinstance(factory._TftpPacketFactory__create(opcode), classes[opcode]), ('opcode %d returns the correct class' % opcode))
def testTftpPacketFactory(self):
    log.debug('===> Running testcase testTftpPacketFactory')
    classes = {1: tftpy.TftpPacketRRQ, 2: tftpy.TftpPacketWRQ, 3: tftpy.TftpPacketDAT, 4: tftpy.TftpPacketACK, 5: tftpy.TftpPacketERR, 6: tftpy.TftpPacketOACK}
    factory = tftpy.TftpPacketFactory()
    for opcode in classes:
        self.assert_(isinstance(factory._TftpPacketFactory__create(opcode), classes[opcode]), ('opcode %d returns the correct class' % opcode))