Esempio n. 1
0
    def test_custom(self):
        hosting_services = tuple(list(HOSTING_SERVICES) + ['kiln'])
        repo_url = "http://example.kiln.com/"

        self.assertEqual(
            identify_hosting_service(repo_url,
                                     hosting_services=hosting_services),
            "kiln")
Esempio n. 2
0
 def test_gitorious(self):
     repo_url = "git://gitorious.org/gitorious/mainline.git"
     self.assertEqual(identify_hosting_service(repo_url), "gitorious")
     repo_url = "http://git.gitorious.org/gitorious/mainline.git"
     self.assertEqual(identify_hosting_service(repo_url), "gitorious")
Esempio n. 3
0
 def test_bitbucket(self):
     repo_url = "https://bitbucket/pydanny/static/"
     self.assertEqual(identify_hosting_service(repo_url), "bitbucket")
Esempio n. 4
0
 def test_github(self):
     repo_url = "[email protected]:pydanny/watdarepo.git"
     self.assertEqual(identify_hosting_service(repo_url), "github")
     repo_url = "https://github.com/pydanny/watdarepo.git"
     self.assertEqual(identify_hosting_service(repo_url), "github")
Esempio n. 5
0
 def test_gitlab(self):
     repo_url = "http://demo.gitlab.com/"
     self.assertEqual(identify_hosting_service(repo_url), "gitlab")
Esempio n. 6
0
 def test_failure(self):
     with self.assertRaises(UnknownHostingService):
         identify_hosting_service("American Hotdogs!")
Esempio n. 7
0
 def test_failure(self):
     with self.assertRaises(UnknownHostingService):
         identify_hosting_service("American Hotdogs!")
Esempio n. 8
0
    def test_custom(self):
        hosting_services = tuple(list(HOSTING_SERVICES) + ['kiln'])
        repo_url = "http://example.kiln.com/"

        self.assertEqual(identify_hosting_service(repo_url, hosting_services=hosting_services), "kiln")
Esempio n. 9
0
 def test_bitbucket(self):
     repo_url = "https://bitbucket/pydanny/static/"
     self.assertEqual(identify_hosting_service(repo_url), "bitbucket")
Esempio n. 10
0
 def test_gitorious(self):
     repo_url = "git://gitorious.org/gitorious/mainline.git"
     self.assertEqual(identify_hosting_service(repo_url), "gitorious")
     repo_url = "http://git.gitorious.org/gitorious/mainline.git"
     self.assertEqual(identify_hosting_service(repo_url), "gitorious")
Esempio n. 11
0
 def test_gitlab(self):
     repo_url = "http://demo.gitlab.com/"
     self.assertEqual(identify_hosting_service(repo_url), "gitlab")
Esempio n. 12
0
 def test_github(self):
     repo_url = "[email protected]:pydanny/watdarepo.git"
     self.assertEqual(identify_hosting_service(repo_url), "github")
     repo_url = "https://github.com/pydanny/watdarepo.git"
     self.assertEqual(identify_hosting_service(repo_url), "github")