Example #1
0
 def test_commit_url_github(self):
     """Verify that GitHub URLs without ".git" are unaltered."""
     repo_url = "https://github.com/openstack/openstack-ansible"
     result = osa_differ.get_commit_url(repo_url)
     assert result == repo_url
Example #2
0
 def test_commit_url_openstack(self):
     """Verify that OpenStack URLs are fixed."""
     repo_url = "https://git.openstack.org/cgit/openstack/openstack-ansible"
     result = osa_differ.get_commit_url(repo_url)
     assert result == "https://github.com/openstack/openstack-ansible"
Example #3
0
 def test_commit_url_unknown(self):
     """Verify that unknown URLs are unaltered."""
     repo_url = "https://reddit.com"
     result = osa_differ.get_commit_url(repo_url)
     assert result == repo_url
Example #4
0
 def test_commit_url_github_ending_with_dotgit(self):
     """Verify that ".git" is stripped from GitHub URLs."""
     repo_url = "https://github.com/openstack/openstack-ansible.git"
     result = osa_differ.get_commit_url(repo_url)
     assert result == repo_url[:-4]