def test_embed_get_params(self): url = 'http://youtu.be/jsrRJyHBvzw' backend = YoutubeBackend(url) params = _embed_get_params(backend, (3, 8)) self.assertEqual('http://www.youtube.com/embed/jsrRJyHBvzw?wmode=opaque', params['url']) self.assertEqual(3, params['width']) self.assertEqual(8, params['height'])
def test_embed_get_params(self): url = 'http://youtu.be/jsrRJyHBvzw' backend = YoutubeBackend(url) params = _embed_get_params(backend, (3, 8)) self.assertEqual( 'http://www.youtube.com/embed/jsrRJyHBvzw?wmode=opaque', params['url']) self.assertEqual(3, params['width']) self.assertEqual(8, params['height'])
def test_embed_get_params_soundcloud_height(self): url = 'https://soundcloud.com/glassnote/mumford-sons-i-will-wait' backend = SoundCloudBackend(url) params = _embed_get_params(backend, (1, 2)) self.assertEqual(backend.height, params['height'])
def test_embed_get_params_soundcloud_height(self): url = 'https://soundcloud.com/glassnote/mumford-sons-i-will-wait' backend = SoundCloudBackend(url) params = _embed_get_params(backend, (1, 2)) self.assertEqual(backend.height, params['height'])