'Moving a top document to a new slug location'

@pytest.mark.move
def test_move_top_level_docs(self):

    page_to_move_title = 'Page    Move    Root'
    page_to_move_slug = 'Page_Move_Root'
    page_child_slug = 'Page_Move_Root/Page_Move_Child'
    page_moved_slug = 'Page_Move_Root_Moved'
    page_child_moved_slug = 'Page_Move_Root_Moved/Page_Move_Child'
    page_to_move_doc = document(title=page_to_move_title, slug=page_to_move_slug, save=True)
    rev = revision(document=page_to_move_doc, title=page_to_move_title, slug=page_to_move_slug, save=True)
    page_to_move_doc.current_revision = rev
    page_to_move_doc.save()
    page_child = revision(title='child', slug=page_child_slug, is_approved=True, save=True)
    page_child_doc = page_child.document
    page_child_doc.parent_topic = page_to_move_doc
    page_child_doc.save()
    new_title = (page_to_move_title + '    Moved')
    page_to_move_doc._move_tree(page_moved_slug, user=None, title=new_title)
    page_to_move_doc = Document.objects.get(slug=page_to_move_slug)
    page_moved_doc = Document.objects.get(slug=page_moved_slug)
    page_child_doc = Document.objects.get(slug=page_child_slug)
    page_child_moved_doc = Document.objects.get(slug=page_child_moved_slug)
    ok_(('REDIRECT' in page_to_move_doc.html))
    ok_((page_moved_slug in page_to_move_doc.html))
    ok_((new_title in page_to_move_doc.html))
    ok_(page_moved_doc)
    ok_(('REDIRECT' in page_child_doc.html))
    ok_((page_moved_slug in page_child_doc.html))
    ok_(page_child_moved_doc)
