mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-12-01 07:34:16 +01:00
5393dc1929
None of these were any real problems, but easier to spot real issues if pylint is a bit quieter. Apart from the pylint overrides being sprinkled over the code base, this commit also fixes occurences of the following issues: - logging-not-lazy - logging-format-interpolation - unused-import - unused-variable
23 lines
778 B
Python
23 lines
778 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
|
|
from svtplay_dl.service import Service
|
|
|
|
|
|
class MockService(Service):
|
|
supported_domains = ['example.com', 'example.net']
|
|
|
|
|
|
class ServiceTest(unittest.TestCase):
|
|
def test_supports(self):
|
|
self.assertTrue(MockService.handles('http://example.com/video.swf?id=1'))
|
|
self.assertTrue(MockService.handles('http://example.net/video.swf?id=1'))
|
|
self.assertTrue(MockService.handles('http://www.example.com/video.swf?id=1'))
|
|
self.assertTrue(MockService.handles('http://www.example.net/video.swf?id=1'))
|