def test_expand_db_attributes_catches_embed_not_found(self, get_embed): get_embed.side_effect = EmbedNotFoundException result = media_embedtype_handler( {'url': 'http://www.youtube.com/watch/'}) self.assertEqual(result, '')
def test_expand_db_attributes_catches_embed_not_found(self, get_embed): get_embed.side_effect = EmbedNotFoundException result = media_embedtype_handler( {'url': 'http://www.youtube.com/watch/'} ) self.assertEqual(result, '')
def test_expand_db_attributes(self, get_embed): get_embed.return_value = Embed( url='http://www.youtube.com/watch/', max_width=None, type='video', html='test html', title='test title', author_name='test author name', provider_name='test provider name', thumbnail_url='htto://test/thumbnail.url', width=1000, height=1000, ) result = media_embedtype_handler( {'url': 'http://www.youtube.com/watch/'}) self.assertIn('test html', result)
def test_expand_db_attributes(self, get_embed): get_embed.return_value = Embed( url='http://www.youtube.com/watch/', max_width=None, type='video', html='test html', title='test title', author_name='test author name', provider_name='test provider name', thumbnail_url='htto://test/thumbnail.url', width=1000, height=1000, ) result = media_embedtype_handler( {'url': 'http://www.youtube.com/watch/'} ) self.assertIn('test html', result)