Add object type filtering to iter_resources
This commit is contained in:
parent
63da39e005
commit
bfb3689456
16 changed files with 92 additions and 61 deletions
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
|
||||
from weboob.tools.test import BackendTest
|
||||
from weboob.capabilities.video import BaseVideo
|
||||
|
||||
class CanalPlusTest(BackendTest):
|
||||
BACKEND = 'canalplus'
|
||||
|
|
@ -29,3 +30,10 @@ class CanalPlusTest(BackendTest):
|
|||
v = l[0]
|
||||
self.backend.fillobj(v, ('url',))
|
||||
self.assertTrue(v.url and v.url.startswith('rtmp://'), 'URL for video "%s" not found: %s' % (v.id, v.url))
|
||||
|
||||
def test_ls(self):
|
||||
l = list(self.backend.iter_resources((BaseVideo, ), []))
|
||||
self.assertTrue(len(l) > 0)
|
||||
|
||||
l = list(self.backend.iter_resources((BaseVideo, ), ['SPORT']))
|
||||
self.assertTrue(len(l) > 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue