Example #1
0
    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)
Example #2
0
 def test_https_remote(self):
     url = 'https://github.com/cvra/master-firmware'
     result = ghg.github_url_from_remote(url)
     self.assertEqual(result, url)
Example #3
0
 def test_origin_not_on_github(self):
     url = '[email protected]:cvra/cvra.github.io.git'
     self.assertIsNone(ghg.github_url_from_remote(url))
Example #4
0
    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)