def test_mobile_persona_preview(self): ctx = {'APP': amo.FIREFOX, 'LANG': 'en-US'} persona = Addon.objects.get(pk=15679).persona s = mobile_persona_preview(ctx, persona) doc = PyQuery(s) bt = doc('.persona-preview div[data-browsertheme]') assert bt assert persona.preview_url in bt.attr('style') eq_(persona.json_data, bt.attr('data-browsertheme')) assert bt.find('p')
def test_mobile_persona_preview(self): ctx = {'APP': amo.FIREFOX, 'LANG': 'en-US'} persona = Addon.objects.get(pk=15679).persona s = mobile_persona_preview(ctx, persona) doc = PyQuery(s) bt = doc('.persona-preview div[data-browsertheme]') assert bt assert persona.preview_url in bt.attr('style') eq_(persona.json_data, bt.attr('data-browsertheme')) assert bt.find('p')