Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

[2acc11]: script.module.brightcove / tests / test_objects.py Maximize Restore History

Download this file

test_objects.py    44 lines (32 with data), 1.2 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#from unittest import TestCase
#from brightcove.objects import Video, item_collection_factory
#TOKEN = 'cE97ArV7TzqBzkmeRVVhJ8O6GWME2iG_bRvjBTlNb4o.'
#class TestBrightcove(TestCase):
#def test_init(self):
#b = Brightcove(TOKEN)
#self.assertEqual(b.token, TOKEN)
#class TestVideoApis(TestCase):
#def setUp(self):
#self.b = Brightcove(TOKEN)
#def test_find_video_by_id(self):
#video_id = 1809586456
#v = self.b.find_video_by_id(video_id=video_id)
#self.assertEqual(video_id, v.id)
##self.assertIsInstance(v, Video)
#def test_find_related_videos_missing_arg(self):
#self.assertRaises(AssertionError, self.b.find_related_videos)
#def test_find_related_videos(self):
#video_id = 1809586456
#v = self.b.find_related_videos(video_id=video_id)
#class TestItemCollection(TestCase):
# def test_item_collection_iter(self):
# cls = item_collection_factory(str)
# ic = cls(['foo', 'bar'])
# for item in ic.items:
# print item
# print
# print ic
# print dir(ic)
# for item in ic:
# print item
# assert False