def test_get_repository_namespace(self): parser = Parser(self._get_data()) assert parser.get_repository_namespace() == "web-conversion" parser2 = Parser({}) assert parser2.get_repository_namespace() == ""
def test_get_branch_name(self): parser = Parser(self._get_data()) assert parser.get_branch_name() == "master" parser2 = Parser({"ref": "refs/heads/feature-test"}) assert parser2.get_branch_name() == "feature-test"
def test_get_project_name(self): parser = Parser(self._get_data()) assert parser.get_project_name() == "lp-toolbox" parser2 = Parser({}) assert parser2.get_branch_name() == ""
def test_get_repository_url(self): parser = Parser(self._get_data()) assert parser.get_repository_url() == "[email protected]:web-conversion/lp-toolbox.git" parser2 = Parser({}) assert parser2.get_repository_url() == ""