pep8
Browse files- tests/test.py +9 -7
tests/test.py
CHANGED
@@ -19,12 +19,14 @@ class TestYouTube(unittest.TestCase):
|
|
19 |
self.filename = 'Pulp Fiction - Dancing Scene'
|
20 |
self.yt = YouTube(self.url)
|
21 |
#: don't hard code, make is universal
|
22 |
-
self.videos = [
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
|
|
|
|
28 |
# using flv since it has only once video
|
29 |
self.flv = '<Video: Sorenson H.263 (.flv) - 240p - N/A>'
|
30 |
|
@@ -46,7 +48,7 @@ class TestYouTube(unittest.TestCase):
|
|
46 |
|
47 |
def test_get_false(self):
|
48 |
with self.assertRaises(MultipleObjectsReturned):
|
49 |
-
|
50 |
|
51 |
def test_get_true(self):
|
52 |
self.assertEqual(str(self.yt.get('flv')), self.flv)
|
|
|
19 |
self.filename = 'Pulp Fiction - Dancing Scene'
|
20 |
self.yt = YouTube(self.url)
|
21 |
#: don't hard code, make is universal
|
22 |
+
self.videos = [
|
23 |
+
'<Video: MPEG-4 Visual (.3gp) - 144p - Simple>',
|
24 |
+
'<Video: MPEG-4 Visual (.3gp) - 240p - Simple>',
|
25 |
+
'<Video: Sorenson H.263 (.flv) - 240p - N/A>',
|
26 |
+
'<Video: H.264 (.mp4) - 360p - Baseline>',
|
27 |
+
'<Video: H.264 (.mp4) - 720p - High>',
|
28 |
+
'<Video: VP8 (.webm) - 360p - N/A>'
|
29 |
+
]
|
30 |
# using flv since it has only once video
|
31 |
self.flv = '<Video: Sorenson H.263 (.flv) - 240p - N/A>'
|
32 |
|
|
|
48 |
|
49 |
def test_get_false(self):
|
50 |
with self.assertRaises(MultipleObjectsReturned):
|
51 |
+
self.yt.get()
|
52 |
|
53 |
def test_get_true(self):
|
54 |
self.assertEqual(str(self.yt.get('flv')), self.flv)
|