diff options
author | Sergey M․ <dstftw@gmail.com> | 2015-11-22 17:27:13 +0600 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2015-11-22 17:27:13 +0600 |
commit | 9cb9a5df7794579c38efff1c4b1451a7d13da3c1 (patch) | |
tree | cec79d46a5e0e19f91c6a8f3a46c805bab787b79 /test | |
parent | 5035536e3f32d4c47b2d3067c12e074cb9a4a199 (diff) |
[utils] Check ext with trailing slash against the list of known extensions
Diffstat (limited to 'test')
-rw-r--r-- | test/test_utils.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/test_utils.py b/test/test_utils.py index 4f0d9e481..501355c74 100644 --- a/test/test_utils.py +++ b/test/test_utils.py @@ -242,6 +242,9 @@ class TestUtil(unittest.TestCase): def test_determine_ext(self): self.assertEqual(determine_ext('http://example.com/foo/bar.mp4/?download'), 'mp4') self.assertEqual(determine_ext('http://example.com/foo/bar/?download', None), None) + self.assertEqual(determine_ext('http://example.com/foo/bar.nonext/?download', None), None) + self.assertEqual(determine_ext('http://example.com/foo/bar/mp4?download', None), None) + self.assertEqual(determine_ext('http://example.com/foo/bar.m3u8//?download'), 'm3u8') def test_find_xpath_attr(self): testxml = '''<root> |