def test_ssh_remote(self): url = '[email protected]:cvra/cvra.github.io.git' expected = 'https://github.com/cvra/cvra.github.io' result = ghg.github_url_from_remote(url) self.assertEqual(result, expected)
def test_https_remote(self): url = 'https://github.com/cvra/master-firmware' result = ghg.github_url_from_remote(url) self.assertEqual(result, url)
def test_origin_not_on_github(self): url = '[email protected]:cvra/cvra.github.io.git' self.assertIsNone(ghg.github_url_from_remote(url))
def test_git_remote(self): url = "git://github.com/cvra/motor-control-firmware.git" expected = 'https://github.com/cvra/motor-control-firmware' result = ghg.github_url_from_remote(url) self.assertEqual(result, expected)