diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2012-12-03 15:36:24 +0100 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2012-12-03 15:36:41 +0100 |
commit | 796173d08b514182eedc704541eb55d5c9e1dc0d (patch) | |
tree | fc25c18ca5724bfdf486106fe58dfa1d1c693d5c /test | |
parent | e575b6821ec185ef4f14c433ccc018d748c0fb60 (diff) |
Keep video IDs verbatim if possible (Closes #571)
Diffstat (limited to 'test')
-rw-r--r-- | test/test_utils.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/test_utils.py b/test/test_utils.py index fd8190f51..8afc30370 100644 --- a/test/test_utils.py +++ b/test/test_utils.py @@ -79,6 +79,11 @@ class TestUtil(unittest.TestCase): self.assertTrue(sanitize_filename('-', restricted=True) != '') self.assertTrue(sanitize_filename(':', restricted=True) != '') + def test_sanitize_ids(self): + self.assertEquals(sanitize_filename('_n_cd26wFpw', is_id=True), '_n_cd26wFpw') + self.assertEquals(sanitize_filename('_BD_eEpuzXw', is_id=True), '_BD_eEpuzXw') + self.assertEquals(sanitize_filename('N0Y__7-UOdI', is_id=True), 'N0Y__7-UOdI') + def test_ordered_set(self): self.assertEqual(orderedSet([1, 1, 2, 3, 4, 4, 5, 6, 7, 3, 5]), [1, 2, 3, 4, 5, 6, 7]) self.assertEqual(orderedSet([]), []) |