Skip to content
This repository has been archived by the owner on Aug 26, 2022. It is now read-only.

Commit

Permalink
bug 1462475: Remove zone move test
Browse files Browse the repository at this point in the history
Zones are deprecated, so this test is no longer required.
  • Loading branch information
jwhitlock committed Aug 6, 2018
1 parent 74a6693 commit 33a3ff7
Showing 1 changed file with 1 addition and 28 deletions.
29 changes: 1 addition & 28 deletions kuma/wiki/tests/test_views.py
Expand Up @@ -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

Expand Down Expand Up @@ -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')
Expand Down

0 comments on commit 33a3ff7

Please sign in to comment.