1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-25 04:35:45 +01:00
svtplay-dl/lib/svtplay_dl/service/tests/service.py
Olof Johansson 436090ddf9 Rename Service's handle method to handles
handle can be ambiguous (i.e, not a verb).

Signed-off-by: Olof Johansson <olof@ethup.se>
2014-01-01 16:22:07 +01:00

23 lines
804 B
Python

#!/usr/bin/python
# ex:ts=4:sw=4:sts=4:et
# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
# The unittest framwork doesn't play nice with pylint:
# pylint: disable-msg=C0103
from __future__ import absolute_import
import unittest
import mock
from svtplay_dl.service import Service
class MockService(Service):
supported_domains = ['example.com', 'example.net']
class ServiceTest(unittest.TestCase):
def test_supports(self):
service = MockService()
self.assertTrue(service.handles('http://example.com/video.swf?id=1'))
self.assertTrue(service.handles('http://example.net/video.swf?id=1'))
self.assertTrue(service.handles('http://www.example.com/video.swf?id=1'))
self.assertTrue(service.handles('http://www.example.net/video.swf?id=1'))