def testValidateLink(self): commonTearDown() commonSetup() basepath = pylons.config['agent_root'] badpath = os.path.join(basepath, 'not_exist') goodpath = os.path.join(basepath, 'packages') badlink = os.path.join(basepath, 'bad_link') goodlink = os.path.join(basepath, 'good_link') utils.symlink(badpath, badlink) assert (utils.validatelink(badlink) == False) utils.symlink(goodpath, goodlink) assert (utils.validatelink(goodlink) == True)
def testValidateLink(self): commonTearDown() commonSetup() basepath = pylons.config['agent_root'] badpath = os.path.join(basepath, 'not_exist') goodpath = os.path.join(basepath, 'packages') badlink = os.path.join(basepath, 'bad_link') goodlink = os.path.join(basepath, 'good_link') utils.symlink(badpath, badlink) assert(utils.validatelink(badlink) == False) utils.symlink(goodpath, goodlink) assert(utils.validatelink(goodlink) == True)
def tearDown(self): commonTearDown()
def tearDown(self): time.sleep(1) commonTearDown()