Beispiel #1
0
    def test_git_is_dirty(self):
        """Test git_is_dirty() function"""

        repo = GitRepo(self.jules_project_path, self.remote, self.branch_ref)
        self.assertFalse(repo.is_dirty())
        repo = GitRepo(self.kishka_project_path, self.remote, self.branch_ref)
        self.assertTrue(repo.is_dirty())
        repo = GitRepo(self.kit_project_path, self.remote, self.branch_ref)
        self.assertFalse(repo.is_dirty())
Beispiel #2
0
    def test_git_is_detached(self):
        """Test git_is_detached() function"""

        repo = GitRepo(self.june_project_path, self.remote, self.branch_ref)
        self.assertFalse(repo.is_detached())
        repo = GitRepo(self.kit_project_path, self.remote, self.branch_ref)
        self.assertFalse(repo.is_detached())
        repo = GitRepo(self.sasha_project_path, self.remote, self.branch_ref)
        self.assertTrue(repo.is_detached())
Beispiel #3
0
    def test_git_sha_long(self):
        """Test git_sha_long() function"""

        repo = GitRepo(self.sasha_project_path, self.remote, self.branch_ref)
        self.assertEqual(repo.sha(), self.sha_ref)
Beispiel #4
0
    def test_git_current_branch(self):
        """Test git_current_branch() function"""

        repo = GitRepo(self.kit_project_path, self.remote, self.branch_ref)
        self.assertEqual(repo.current_branch(), 'master')