'Moving a tree of documents under an existing doc updates breadcrumbs'

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

    grandpa = revision(title='Top-level    parent    for    breadcrumb    move', slug='grandpa', is_approved=True, save=True)
    grandpa_doc = grandpa.document
    dad = revision(title='Mid-level    parent    for    breadcrumb    move', slug='grandpa/dad', is_approved=True, save=True)
    dad_doc = dad.document
    dad_doc.parent_topic = grandpa_doc
    dad_doc.save()
    son = revision(title='Bottom-level    child    for    breadcrumb    move', slug='grandpa/dad/son', is_approved=True, save=True)
    son_doc = son.document
    son_doc.parent_topic = dad_doc
    son_doc.save()
    grandma = revision(title='Top-level    parent    for    breadcrumb    move', slug='grandma', is_approved=True, save=True)
    grandma_doc = grandma.document
    mom = revision(title='Mid-level    parent    for    breadcrumb    move', slug='grandma/mom', is_approved=True, save=True)
    mom_doc = mom.document
    mom_doc.parent_topic = grandma_doc
    mom_doc.save()
    daughter = revision(title='Bottom-level    child    for    breadcrumb    move', slug='grandma/mom/daughter', is_approved=True, save=True)
    daughter_doc = daughter.document
    daughter_doc.parent_topic = mom_doc
    daughter_doc.save()
    grandma_doc._move_tree('grandpa/grandma')
    grandma_moved = Document.objects.get(locale=grandma_doc.locale, slug='grandpa/grandma')
    ok_((grandma_moved.parent_topic == grandpa_doc))
    mom_moved = Document.objects.get(locale=mom_doc.locale, slug='grandpa/grandma/mom')
    ok_((mom_moved.parent_topic == grandma_moved))
