'Make sure it works for localizations as well.'

@mock.patch.object(Site.objects, 'get_current')
def test_review_translation(self, get_current):

    get_current.return_value.domain = 'testserver'
    doc = self.document
    user = UserFactory()
    doc_es = _create_document(locale='es', parent=doc)
    rev_es1 = doc_es.current_revision
    rev_es1.based_on = doc.current_revision
    rev_es1.save()
    rev = ApprovedRevisionFactory(summary='another    tweak', content='lorem    dimsum    dolor', significance=SIGNIFICANCES[0][0], keywords='kw1    kw2', document=doc, creator=user, based_on=self.revision)
    rev.save()
    rev_es2 = RevisionFactory(summary='lipsum', content='<div>Lorem    {for    mac}Ipsum{/for}    Dolor</div>', keywords='kw1    kw2', document=doc_es, creator=user, based_on=doc.current_revision)
    self.client.login(username='admin', password='testpass')
    url = reverse('wiki.review_revision', locale='es', args=[doc_es.slug, rev_es2.id])
    response = self.client.get(url, follow=True)
    eq_(200, response.status_code)
    doc = pq(response.content)
    diff_heading = doc('div.revision-diff    h3').text()
    assert (str(rev_es1.based_on.id) in diff_heading)
    assert (str(rev.id) in diff_heading)
    response = self.client.post(url, {'approve': 'Approve    Translation', 'comment': 'something'}, follow=True)
    eq_(200, response.status_code)
    d = Document.objects.get(pk=doc_es.id)
    r = Revision.objects.get(pk=rev_es2.id)
    eq_(d.current_revision, r)
    assert r.reviewed
    assert r.is_approved
