Example #1
0
    def test_truncate_ref_sha(self):
        """Test _truncate_ref() function for sha ref"""

        self.assertEqual(GitRepo.truncate_ref(self.sha_ref), self.sha_ref)
Example #2
0
    def test_truncate_ref_tag(self):
        """Test _truncate_ref() function for tag ref"""

        self.assertEqual(GitRepo.truncate_ref(self.tag_ref), 'v1.0')
Example #3
0
    def test_truncate_ref_branch(self):
        """Test _truncate_ref() function for branch ref"""

        self.assertEqual(GitRepo.truncate_ref(self.branch_ref), 'master')