'If a document is shown in fallback locale because the document is not
available in requested locale, it should fire a "Fallback Locale" GA event'

def test_custom_event_while_fallback_locale(self):

    r = ApprovedRevisionFactory(is_ready_for_localization=True)
    trans = DocumentFactory(parent=r.document, locale='bn-BD')
    ApprovedRevisionFactory(document=trans, based_on=r)
    url = reverse('wiki.document', args=[r.document.slug], locale='bn-IN')
    response = self.client.get(url)
    eq_(200, response.status_code)
    doc = pq(response.content)
    ga_data = ((r.document.slug + '/bn-IN') + '/bn-BD')
    assert (ga_data in doc('body').attr('data-ga-push'))
    assert ('"Fallback    Locale"' in doc('body').attr('data-ga-push'))
    assert ('"Not    Localized"' not in doc('body').attr('data-ga-push'))
