add module cappedtv
Signed-off-by: Lord <lord@lordtoniok.com> Signed-off-by: Romain Bignon <romain@symlink.me>
This commit is contained in:
parent
231b7ea9da
commit
c45cddc337
5 changed files with 195 additions and 0 deletions
27
modules/cappedtv/test.py
Normal file
27
modules/cappedtv/test.py
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright(C) 2012 Lord
|
||||
#
|
||||
# This module is free software. It comes without any warranty, to
|
||||
# the extent permitted by applicable law. You can redistribute it
|
||||
# and/or modify it under the terms of the Do What The Fuck You Want
|
||||
# To Public License, Version 2, as published by Sam Hocevar. See
|
||||
# http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
|
||||
|
||||
from weboob.tools.test import BackendTest
|
||||
|
||||
|
||||
__all__ = ['CappedTest']
|
||||
|
||||
|
||||
class CappedTest(BackendTest):
|
||||
BACKEND = 'cappedtv'
|
||||
|
||||
def test_capped(self):
|
||||
l = list(self.backend.iter_search_results('kewlers'))
|
||||
self.assertTrue(len(l) > 0)
|
||||
v = l[0]
|
||||
self.backend.fillobj(v, ('url',))
|
||||
self.assertTrue(v.url and v.url.startwith('http://'), 'URL for video "%s" not found' % (v.id, v.url))
|
||||
self.backend.browser.openurl(v.url)
|
||||
Loading…
Add table
Add a link
Reference in a new issue