'Selection of a parent topic when creating a document.'

def test_parent_topic(self):

    self.client.login(username='admin', password='testpass')
    d = document(title='HTML8')
    d.save()
    r = revision(document=d)
    r.save()
    data = new_document_data()
    data['title'] = 'Replicated    local    storage'
    data['parent_topic'] = d.id
    resp = self.client.post(reverse('wiki.create'), data)
    eq_(302, resp.status_code)
    ok_((d.children.count() == 1))
    ok_((d.children.all()[0].title == 'Replicated    local    storage'))
