Skip to content

Commit 2b4fddb

Browse files
committed
Fix test
1 parent cabe0c9 commit 2b4fddb

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

readthedocs/rtd_tests/tests/test_footer.py

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import mock
22
from django.contrib.sessions.backends.base import SessionBase
33
from django.test import TestCase
4+
from django.test.utils import override_settings
45
from rest_framework.test import APIRequestFactory, APITestCase
56

67
from readthedocs.api.v2.views.footer_views import (
@@ -114,6 +115,10 @@ def test_not_show_edit_on_github(self):
114115
self.assertNotIn('Edit', response.data['html'])
115116

116117

118+
@override_settings(
119+
USE_SUBDOMAIN=True,
120+
PUBLIC_DOMAIN='readthedocs.io',
121+
)
117122
class TestVersionCompareFooter(TestCase):
118123
fixtures = ['test_data']
119124

@@ -124,7 +129,7 @@ def test_highest_version_from_stable(self):
124129
base_version = self.pip.get_stable_version()
125130
valid_data = {
126131
'project': 'Version 0.8.1 of Pip (19)',
127-
'url': '/dashboard/pip/version/0.8.1/',
132+
'url': 'http://pip.readthedocs.io/en/0.8.1/',
128133
'slug': '0.8.1',
129134
'version': '0.8.1',
130135
'is_highest': True,
@@ -136,7 +141,7 @@ def test_highest_version_from_lower(self):
136141
base_version = self.pip.versions.get(slug='0.8')
137142
valid_data = {
138143
'project': 'Version 0.8.1 of Pip (19)',
139-
'url': '/dashboard/pip/version/0.8.1/',
144+
'url': 'http://pip.readthedocs.io/en/0.8.1/',
140145
'slug': '0.8.1',
141146
'version': '0.8.1',
142147
'is_highest': False,
@@ -149,7 +154,7 @@ def test_highest_version_from_latest(self):
149154
base_version = self.pip.versions.get(slug=LATEST)
150155
valid_data = {
151156
'project': 'Version 0.8.1 of Pip (19)',
152-
'url': '/dashboard/pip/version/0.8.1/',
157+
'url': 'http://pip.readthedocs.io/en/0.8.1/',
153158
'slug': '0.8.1',
154159
'version': '0.8.1',
155160
'is_highest': True,
@@ -177,7 +182,7 @@ def test_highest_version_over_branches(self):
177182
base_version = self.pip.versions.get(slug='0.8.1')
178183
valid_data = {
179184
'project': 'Version 1.0.0 of Pip ({})'.format(version.pk),
180-
'url': '/dashboard/pip/version/1.0.0/',
185+
'url': 'http://pip.readthedocs.io/en/1.0.0/',
181186
'slug': '1.0.0',
182187
'version': '1.0.0',
183188
'is_highest': False,
@@ -191,7 +196,7 @@ def test_highest_version_without_tags(self):
191196
base_version = self.pip.versions.get(slug='0.8.1')
192197
valid_data = {
193198
'project': 'Version 0.8.1 of Pip (19)',
194-
'url': '/dashboard/pip/version/0.8.1/',
199+
'url': 'http://pip.readthedocs.io/en/0.8.1/',
195200
'slug': '0.8.1',
196201
'version': '0.8.1',
197202
'is_highest': True,
@@ -202,7 +207,7 @@ def test_highest_version_without_tags(self):
202207
base_version = self.pip.versions.get(slug='0.8')
203208
valid_data = {
204209
'project': 'Version 0.8.1 of Pip (19)',
205-
'url': '/dashboard/pip/version/0.8.1/',
210+
'url': 'http://pip.readthedocs.io/en/0.8.1/',
206211
'slug': '0.8.1',
207212
'version': '0.8.1',
208213
'is_highest': False,
@@ -219,7 +224,7 @@ def test_highest_version_without_tags(self):
219224
)
220225
valid_data = {
221226
'project': 'Version 2.0.0 of Pip ({})'.format(version.pk),
222-
'url': '/dashboard/pip/version/2.0.0/',
227+
'url': 'http://pip.readthedocs.io/en/2.0.0/',
223228
'slug': '2.0.0',
224229
'version': '2.0.0',
225230
'is_highest': False,

0 commit comments

Comments
 (0)