def cmpPrecheckDict(precheckName, expectedDict): precheckOutput = open(_testFilePath(precheckName)).read() actualDict = esxupgrade.deserializePrecheck(precheckOutput) print expectedDict print " ----" print actualDict assert expectedDict == actualDict
def cmpKickstart(precheckName, kickstartName, config): precheckOutput = open(_testFilePath(precheckName)).read() expectedKickstart = open(_testFilePath(kickstartName)).read() precheckDict = esxupgrade.deserializePrecheck(precheckOutput) assert precheckDict['errors'] == [] actualKickstart = esxupgrade.convertPrecheckToKickstart( precheckDict, config) print actualKickstart assert expectedKickstart == actualKickstart