Beispiel #1
0
 def test_getScriptInfo(self):
     sName, md5 = self.createScript()
     info = hooks._getScriptInfo(sName)
     os.unlink(sName)
     self.assertEqual({'md5': md5}, info)
Beispiel #2
0
 def test_getNEScriptInfo(self):
     path = '/tmp/nonExistent'
     info = hooks._getScriptInfo(path)
     self.assertEqual({'md5': ''}, info)
Beispiel #3
0
 def test_getScriptInfo(self):
     sName, md5 = self.createScript()
     info = hooks._getScriptInfo(sName)
     os.unlink(sName)
     self.assertEqual({'md5': md5}, info)
Beispiel #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}
Beispiel #5
0
 def test_getNEScriptInfo(self):
     path = '/tmp/nonExistent'
     info = hooks._getScriptInfo(path)
     self.assertEqual({'md5': ''}, info)