diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2012-10-28 15:33:59 -0700 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2012-10-28 15:33:59 -0700 |
commit | aeca861f227abd282e1ee57b13d1bcba28fe40db (patch) | |
tree | 39e1a4b11aeb7290f77103611dba0a6dc718a3f8 /test | |
parent | fe4d68e1967cc39cc00a06c3e2e722d51b8e1419 (diff) | |
parent | 42cb53fcfa2e8bbc7a96bc1a0ad1e90c1917dccd (diff) |
Merge pull request #502 from FiloSottile/new_sanitize_filename
My sanitize_filename proposal
Diffstat (limited to 'test')
-rw-r--r-- | test/test_utils.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/test_utils.py b/test/test_utils.py index eb0af703f..878840120 100644 --- a/test/test_utils.py +++ b/test/test_utils.py @@ -22,13 +22,13 @@ class TestUtil(unittest.TestCase): self.assertEqual(sanitize_filename(u'123'), u'123') - self.assertEqual(u'abc_de', sanitize_filename(u'abc/de')) - self.assertTrue(u'de' in sanitize_filename(u'abc/de')) + self.assertEqual(u'abc-de', sanitize_filename(u'abc/de')) self.assertFalse(u'/' in sanitize_filename(u'abc/de///')) - self.assertEqual(u'abc_de', sanitize_filename(u'abc\\de')) - self.assertEqual(u'abc_de', sanitize_filename(u'abc\\de')) - self.assertTrue(u'de' in sanitize_filename(u'abc\\de')) + self.assertEqual(u'abc-de', sanitize_filename(u'abc/<>\\*|de')) + self.assertEqual(u'xxx', sanitize_filename(u'xxx/<>\\*|')) + self.assertEqual(u'yes no', sanitize_filename(u'yes? no')) + self.assertEqual(u'this - that', sanitize_filename(u'this: that')) self.assertEqual(sanitize_filename(u'ä'), u'ä') self.assertEqual(sanitize_filename(u'кириллица'), u'кириллица') |