]> git.bitcoin.ninja Git - youtube-dl/commitdiff
correction on the test for the utils.py
authorgcmalloc <gcmalloc@gmail.com>
Fri, 28 Sep 2012 16:00:20 +0000 (18:00 +0200)
committergcmalloc <gcmalloc@gmail.com>
Fri, 12 Oct 2012 18:24:58 +0000 (20:24 +0200)
test/test_utils.py

index d4b4cb9200748a85ef94e2e0ee372b9d146a4056..910fcfad4d542f69d6833ac28060be6d3b28e476 100644 (file)
@@ -22,13 +22,12 @@ class TestUtil(unittest.TestCase):
 
         self.assertEqual(sanitize_filename(u'123'), u'123')
 
-        self.assertNotIn(u'/', sanitize_filename(u'abc/de'))
-        self.assertNotIn(u'abc', sanitize_filename(u'abc/de'))
+        self.assertEqual(u'abc_de', sanitize_filename(u'abc/de'))
         self.assertIn(u'de', sanitize_filename(u'abc/de'))
         self.assertNotIn(u'/', sanitize_filename(u'abc/de///'))
 
-        self.assertIn(u'\\', sanitize_filename(u'abc\\de'))
-        self.assertIn(u'abc', 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.assertIn(u'de', sanitize_filename(u'abc\\de'))
 
         self.assertEqual(sanitize_filename(u'ä'), u'ä')
@@ -43,6 +42,5 @@ class TestUtil(unittest.TestCase):
 
     def test_unescape_html(self):
         self.assertEqual(unescapeHTML(u"%20;"), u"%20;")
-        self.assertEqual(unescapeHTML(u"gre&tre&yre"), [u'gre', u'tre', u'yre'])