Пример #1
0
 def test_getHookInfo(self):
     with namedTemporaryDir() as dir:
         sName, md5 = self.createScript(dir)
         with tempfile.NamedTemporaryFile(dir=dir) as NEscript:
             os.chmod(NEscript.name, 0o000)
             info = hooks._getHookInfo(dir)
             expectedRes = dict([(os.path.basename(sName), {'md5': md5})])
             self.assertEqual(expectedRes, info)
Пример #2
0
 def test_getHookInfo(self):
     with namedTemporaryDir() as dir:
         sName, md5 = self.createScript(dir)
         with tempfile.NamedTemporaryFile(dir=dir) as NEscript:
             os.chmod(NEscript.name, 0o000)
             info = hooks._getHookInfo(dir)
             expectedRes = dict([(os.path.basename(sName), {'md5': md5})])
             self.assertEqual(expectedRes, info)
Пример #3
0
 def test_getHookInfo(self):
     dir = tempfile.mkdtemp()
     sName, md5 = self.createScript(dir)
     NEscript = tempfile.NamedTemporaryFile(dir=dir)
     os.chmod(NEscript.name, 0000)
     info = hooks._getHookInfo(dir)
     os.unlink(sName)
     expectedRes = dict([(os.path.basename(sName), {'md5': md5})])
     self.assertEqual(expectedRes, info)
Пример #4
0
 def test_getHookInfo(self):
     dir = tempfile.mkdtemp()
     sName, md5 = self.createScript(dir)
     NEscript = tempfile.NamedTemporaryFile(dir=dir)
     os.chmod(NEscript.name, 0000)
     info = hooks._getHookInfo(dir)
     os.unlink(sName)
     expectedRes = dict([(os.path.basename(sName), {'md5': md5})])
     self.assertEqual(expectedRes, info)