def test_git_detect_without_git(self): os.putenv("PATH", TEST_DIR) self.assertFalse(summoner.detect_git())
def test_git_detect_with_git(self): f = open(TEST_DIR + "/git", "w") f.close() os.chmod(TEST_DIR + "/git", 0777) os.putenv("PATH", TEST_DIR) self.assertTrue(summoner.detect_git())