From 33a3ff792d3653d8f62e6ac66863106cdcf97032 Mon Sep 17 00:00:00 2001 From: John Whitlock Date: Fri, 3 Aug 2018 15:35:53 -0500 Subject: [PATCH] bug 1462475: Remove zone move test Zones are deprecated, so this test is no longer required. --- kuma/wiki/tests/test_views.py | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/kuma/wiki/tests/test_views.py b/kuma/wiki/tests/test_views.py index 15456a8e90e..2d7d0ff5bd8 100644 --- a/kuma/wiki/tests/test_views.py +++ b/kuma/wiki/tests/test_views.py @@ -31,7 +31,7 @@ from ..content import get_seo_description from ..events import EditDocumentEvent, EditDocumentInTreeEvent from ..forms import MIDAIR_COLLISION -from ..models import Document, DocumentDeletionLog, DocumentZone, RevisionIP +from ..models import Document, DocumentDeletionLog, RevisionIP from ..templatetags.jinja_helpers import get_compare_url from ..views.document import _get_seo_parent_title @@ -785,33 +785,6 @@ def test_creating_child_of_redirect(self): parameters = parse_qs(urlparse(response['Location']).query) assert parameters['parent'][0] == str(doc.id) - def test_creating_child_of_redirect_zoned_doc_with_unzoned_doc_slug(self): - """ - While trying to create a child of a redirected zone document with its - unzoned document slug, the parent of the child should be redirect's - parent. - """ - self.client.login(username='admin', password='testpass') - rev = revision(is_approved=True, save=True) - root_doc = rev.document - # Create a zone of the document - zoned_doc = DocumentZone(document=root_doc, url_root="zoned_url") - zoned_doc.save() - - # Move the document to new slug - root_doc._move_tree(new_slug="moved_doc") - - # Try to create a child doc with root document slug - unzoned_doc_child_full_slug = root_doc.slug + "/children_document" - url = reverse('wiki.document', args=[unzoned_doc_child_full_slug]) - response = self.client.get(url, follow=True) - assert response.status_code == 200 - # The parent id of the query should be same because while moving, - # a new document is created with old slug and make redirect to the - # old document - parameters = parse_qs(response.request['QUERY_STRING']) - assert parameters['parent'][0] == str(root_doc.id) - def test_child_of_redirect_to_non_document(self): """Return a 404 when accessing the child of a non-document redirect.""" self.client.login(username='admin', password='testpass')