'Make sure we can save a document with translations.'

def test_can_save_document_with_translations(self):

    _create_document(title='Document    Prueba', parent=self.d, locale='es')
    response = self.client.get(reverse('wiki.edit', args=[self.d.slug]), follow=True)
    eq_(200, response.status_code)
    doc = pq(response.content)
    data = new_document_data()
    new_title = 'A    brand    new    title'
    data.update(title=new_title)
    data['form-type'] = 'doc'
    data.update(is_localizable='True')
    response = self.client.post(reverse('wiki.edit', args=[self.d.slug]), data, follow=True)
    eq_(200, response.status_code)
    doc = Document.objects.get(pk=self.d.pk)
    eq_(new_title, doc.title)
