'Verify youtube video embedding.'

def test_youtube_in_post(self):

    u = UserFactory()
    t = ThreadFactory()
    self.client.login(username=u.username, password='testpass')
    response = post(self.client, 'forums.reply', {'content': '[[V:http://www.youtube.com/watch?v=oHg5SJYRHA0]]'}, args=[t.forum.slug, t.id])
    doc = pq(response.content)
    assert doc('iframe')[0].attrib['src'].startswith('//www.youtube.com/embed/oHg5SJYRHA0')
