Example #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")
Example #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")
Example #3
0
 def test_bitbucket(self):
     repo_url = "https://bitbucket/pydanny/static/"
     self.assertEqual(identify_hosting_service(repo_url), "bitbucket")
Example #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")
Example #5
0
 def test_gitlab(self):
     repo_url = "http://demo.gitlab.com/"
     self.assertEqual(identify_hosting_service(repo_url), "gitlab")
Example #6
0
 def test_failure(self):
     with self.assertRaises(UnknownHostingService):
         identify_hosting_service("American Hotdogs!")
Example #7
0
 def test_failure(self):
     with self.assertRaises(UnknownHostingService):
         identify_hosting_service("American Hotdogs!")
Example #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")
Example #9
0
 def test_bitbucket(self):
     repo_url = "https://bitbucket/pydanny/static/"
     self.assertEqual(identify_hosting_service(repo_url), "bitbucket")
Example #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")
Example #11
0
 def test_gitlab(self):
     repo_url = "http://demo.gitlab.com/"
     self.assertEqual(identify_hosting_service(repo_url), "gitlab")
Example #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")