Skip to content

Commit

Permalink
Add test for SoundCloudBackend.get_url
Browse files Browse the repository at this point in the history
  • Loading branch information
yetty committed Feb 24, 2014
1 parent 49839aa commit f09df0e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion embed_video/tests/tests_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,10 @@ def get_info(self):
return {
'width': 123,
'height': 321,
'thumbnail_url': 'xyz'
'thumbnail_url': 'xyz',
'html': u'\u003Ciframe width=\"100%\" height=\"400\" '
u'scrolling=\"no\" frameborder=\"no\" '
u'src=\"{0}\"\u003E\u003C/iframe\u003E'.format(self.url)
}

self.foo = FooBackend('abcd')
Expand All @@ -131,6 +134,9 @@ def test_height(self):
def test_get_thumbnail_url(self):
self.assertEqual(self.foo.get_thumbnail_url(), 'xyz')

def test_get_url(self):
self.assertEqual(self.foo.get_url(), self.foo.url)

def test_get_embed_code(self):
self.assertEqual(self.foo.get_embed_code(100, 200),
'<iframe width="100" height="321" src="foobar" '
Expand Down

0 comments on commit f09df0e

Please sign in to comment.