'The document template falls back to fallback locale if there is
custom wiki fallback mapping for the locale and the locale have no translation
exists.'

def test_document_with_fallback_locale(self):

    en_rev = ApprovedRevisionFactory(is_ready_for_localization=True)
    trans_doc = DocumentFactory(parent=en_rev.document, locale='bn-BD')
    trans_rev = ApprovedRevisionFactory(document=trans_doc)
    trans_doc.current_revision = trans_rev
    trans_doc.save()
    url = reverse('wiki.document', args=[en_rev.document.slug], locale='bn-IN')
    response = self.client.get(url)
    doc = pq(response.content)
    eq_(trans_doc.title, doc('article    h1.title').text())
    eq_(1, len(doc('#doc-pending-fallback')))
    assert ('Translate    Article' in doc('#editing-tools-sidebar').text())
    doc('#doc-pending-fallback').remove()
    eq_(pq(trans_doc.html)('div').text(), doc('#doc-content    div').text())
