Beispiel #1
0
 def test_platform_img_with_optional_attributes(self):
     """Should return expected markup with optional attributes"""
     markup = platform_img('test.png', {'data-test-attr': 'test'})
     expected = (
         u'<img class="platform-img js" src="" data-src="/media/test.png" '
         u'data-test-attr="test"><noscript><img class="platform-img win" '
         u'src="/media/test.png" data-test-attr="test"></noscript>')
     self.assertEqual(markup, jinja2.Markup(expected))
Beispiel #2
0
 def test_platform_img_with_optional_attributes(self):
     """Should return expected markup with optional attributes"""
     markup = platform_img('test.png', {'data-test-attr': 'test'})
     expected = (
         u'<img class="platform-img js" src="" data-src="/media/test.png" '
         u'data-test-attr="test"><noscript><img class="platform-img win" '
         u'src="/media/test.png" data-test-attr="test"></noscript>')
     self.assertEqual(markup, jinja2.Markup(expected))
Beispiel #3
0
 def test_platform_img_no_optional_attributes(self):
     """Should return expected markup without optional attributes"""
     markup = platform_img('test.png')
     expected = (
         u'<img class="platform-img js" src="" data-src="/media/test.png" >'
         u'<noscript><img class="platform-img win" src="/media/test.png" >'
         u'</noscript>')
     self.assertEqual(markup, jinja2.Markup(expected))
Beispiel #4
0
 def test_platform_img_no_optional_attributes(self):
     """Should return expected markup without optional attributes"""
     markup = platform_img('test.png')
     expected = (
         u'<img class="platform-img js" src="" data-src="/media/test.png" >'
         u'<noscript><img class="platform-img win" src="/media/test.png" >'
         u'</noscript>')
     self.assertEqual(markup, jinja2.Markup(expected))