'It should be possible to get the localized document
even though the url of default locale document is passed'

def test_from_url_with_default_locale_slug(self):

    en_doc = document(save=True, locale=settings.WIKI_DEFAULT_LANGUAGE)
    bn_doc = document(parent=en_doc, locale='bn-BD', save=True)
    url = reverse('wiki.document', locale=bn_doc.locale, args=[en_doc.slug])
    get_doc = Document.from_url(url)
    assert (get_doc.id == bn_doc.id)
    url = reverse('wiki.document', locale=bn_doc.locale, args=[(en_doc.slug + 'bad_slug')])
    get_doc = Document.from_url(url)
    assert (get_doc is None)
