Esempio n. 1
0
 def test_getScriptInfo(self):
     sName, md5 = self.createScript()
     info = hooks._getScriptInfo(sName)
     os.unlink(sName)
     self.assertEqual({'md5': md5}, info)
Esempio n. 2
0
 def test_getNEScriptInfo(self):
     path = '/tmp/nonExistent'
     info = hooks._getScriptInfo(path)
     self.assertEqual({'md5': ''}, info)
Esempio n. 3
0
 def test_getScriptInfo(self):
     sName, md5 = self.createScript()
     info = hooks._getScriptInfo(sName)
     os.unlink(sName)
     self.assertEqual({'md5': md5}, info)
Esempio n. 4
0
def test_get_script_info_should_return_checksum(hooks_dir, expected):
    path = str(hooks_dir.join("script.sh"))

    assert hooks._getScriptInfo(path) == {"md5": expected}
Esempio n. 5
0
 def test_getNEScriptInfo(self):
     path = '/tmp/nonExistent'
     info = hooks._getScriptInfo(path)
     self.assertEqual({'md5': ''}, info)