Exemple #1
0
    def test_basic(self):
        result = vimeo_embed_code('id', width=5, height=2, elem_class='cls')
        iframe = pq(result)

        eq_(iframe[0].tag, 'iframe')
        ok_(iframe.hasClass('cls'))
        ok_(iframe.attr.src.startswith('https://player.vimeo.com/video/id'))
        eq_(iframe.attr.width, '5')
        eq_(iframe.attr.height, '2')
Exemple #2
0
 def embed_html(self, **kwargs):
     """Return the HTML code to embed this video."""
     return jinja2.Markup(vimeo_embed_code(self.vimeo_id, **kwargs))
 def embed_html(self, **kwargs):
     """Return the HTML code to embed this video."""
     return vimeo_embed_code(self.vimeo_id, **kwargs)