Exemple #1
0
    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)
Exemple #2
0
    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)
Exemple #3
0
 def tearDown(self):
     commonTearDown()
 def tearDown(self):
     time.sleep(1)
     commonTearDown()