|
|
@ -85,8 +85,11 @@ class TestUtil(unittest.TestCase):
|
|
|
|
self.assertEqual(
|
|
|
|
self.assertEqual(
|
|
|
|
sanitize_filename('New World record at 0:12:34'),
|
|
|
|
sanitize_filename('New World record at 0:12:34'),
|
|
|
|
'New World record at 0_12_34')
|
|
|
|
'New World record at 0_12_34')
|
|
|
|
|
|
|
|
|
|
|
|
self.assertEqual(sanitize_filename('--gasdgf'), '_-gasdgf')
|
|
|
|
self.assertEqual(sanitize_filename('--gasdgf'), '_-gasdgf')
|
|
|
|
self.assertEqual(sanitize_filename('--gasdgf', is_id=True), '--gasdgf')
|
|
|
|
self.assertEqual(sanitize_filename('--gasdgf', is_id=True), '--gasdgf')
|
|
|
|
|
|
|
|
self.assertEqual(sanitize_filename('.gasdgf'), 'gasdgf')
|
|
|
|
|
|
|
|
self.assertEqual(sanitize_filename('.gasdgf', is_id=True), '.gasdgf')
|
|
|
|
|
|
|
|
|
|
|
|
forbidden = '"\0\\/'
|
|
|
|
forbidden = '"\0\\/'
|
|
|
|
for fc in forbidden:
|
|
|
|
for fc in forbidden:
|
|
|
|