aboutsummaryrefslogtreecommitdiff
path: root/test/test_utils.py
diff options
context:
space:
mode:
authorFilippo Valsorda <filippo.valsorda@gmail.com>2012-12-08 01:57:43 +0100
committerFilippo Valsorda <filippo.valsorda@gmail.com>2012-12-08 01:57:43 +0100
commit3c6ffbaedbbae8734f6b86fea1169413b656abf3 (patch)
tree27edbd964e1411e0228900b1c36612058cca7954 /test/test_utils.py
parentc7287a3cafba65b700b64633d76aa016f5cbc95d (diff)
parent863baa16eca7a98c38fb29c5e54f76df224f2351 (diff)
Merge 'rg3/master' into fork_master
Diffstat (limited to 'test/test_utils.py')
-rw-r--r--test/test_utils.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/test_utils.py b/test/test_utils.py
index fd8190f51..796ed4ab2 100644
--- a/test/test_utils.py
+++ b/test/test_utils.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
# Various small unit tests
import sys
@@ -79,6 +81,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([]), [])