Skip to content

Commit 3de35d0

Browse files
committed
Fix merge conflict
1 parent bf380bc commit 3de35d0

File tree

1 file changed

+2
-31
lines changed

1 file changed

+2
-31
lines changed

readthedocs/rtd_tests/tests/test_doc_serving.py

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212

1313
from readthedocs.core.views.serve import _serve_symlink_docs
1414
from readthedocs.builds.constants import STABLE
15-
from readthedocs.builds.models import Versionfrom readthedocs.projects import constants
15+
from readthedocs.builds.models import Version
16+
from readthedocs.projects import constants
1617
from readthedocs.projects.models import Project
1718
from readthedocs.rtd_tests.base import RequestFactoryTestMixin
1819

@@ -198,36 +199,6 @@ def test_custom_robots_txt(self, os_mock, open_mock):
198199
PUBLIC_DOMAIN='readthedocs.io',
199200
ROOT_URLCONF=settings.SUBDOMAIN_URLCONF,
200201
)
201-
def test_default_robots_txt(self):
202-
self.public.versions.update(active=True, built=True)
203-
self.public.versions.filter(slug=STABLE).update(privacy_level=constants.PRIVATE)
204-
response = self.client.get(
205-
reverse('sitemap_xml'),
206-
HTTP_HOST='public.readthedocs.io',
207-
)
208-
self.assertEqual(response.status_code, 200)
209-
self.assertEqual(response.content_type, 'application/xml')
210-
for version in self.public.versions.filter(privacy_level=constants.PUBLIC):
211-
self.assertContains(
212-
response,
213-
self.public.get_docs_url(
214-
version_slug=version.slug,
215-
lang_slug=self.project.language,
216-
private=False,
217-
),
218-
)
219-
220-
# stable is marked as PRIVATE and should not appear here
221-
stable = self.public.versions.get(slug=STABLE)
222-
self.assertNotContains(
223-
response,
224-
self.public.get_docs_url(
225-
version_slug=stable.slug,
226-
lang_slug=self.project.language,
227-
private=True,
228-
),
229-
)
230-
231202
def test_sitemap_xml(self):
232203
self.public.versions.update(active=True)
233204
private_version = fixture.get(

0 commit comments

Comments
 (0)