Skip to content

Commit 419cdb3

Browse files
committed
Tests updated
1 parent 73c55f3 commit 419cdb3

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

readthedocs/rtd_tests/tests/test_builds.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -702,6 +702,8 @@ def test_external_version_name_generic(self):
702702
)
703703

704704
def test_get_commit_url_external_version_github(self):
705+
self.pip.repo = 'https://github.com/pypa/pip'
706+
self.pip.save()
705707

706708
external_build = get(
707709
Build,
@@ -716,7 +718,6 @@ def test_get_commit_url_external_version_github(self):
716718
self.assertEqual(external_build.get_commit_url(), expected_url)
717719

718720
def test_get_commit_url_external_version_gitlab(self):
719-
720721
self.pip.repo = 'https://gitlab.com/pypa/pip'
721722
self.pip.save()
722723

readthedocs/rtd_tests/tests/test_project.py

+4
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,13 @@ def test_get_latest_build_excludes_external_versions(self):
196196
self.assertEqual(self.pip.get_latest_build(), None)
197197

198198
def test_git_provider_name_github(self):
199+
self.pip.repo = 'https://github.com/pypa/pip'
200+
self.pip.save()
199201
self.assertEqual(self.pip.git_provider_name, GITHUB_BRAND)
200202

201203
def test_git_service_class_github(self):
204+
self.pip.repo = 'https://github.com/pypa/pip'
205+
self.pip.save()
202206
self.assertEqual(self.pip.git_service_class(), GitHubService)
203207

204208
def test_git_provider_name_gitlab(self):

readthedocs/rtd_tests/tests/test_version.py

+3
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ def setUp(self):
4646
class TestVersionModel(VersionMixin, TestCase):
4747

4848
def test_vcs_url_for_external_version_github(self):
49+
self.pip.repo = 'https://github.com/pypa/pip'
50+
self.pip.save()
51+
4952
expected_url = f'https://github.com/pypa/pip/pull/{self.external_version.verbose_name}'
5053
self.assertEqual(self.external_version.vcs_url, expected_url)
5154

0 commit comments

Comments
 (0)