(self)
| 393 | text.unescape_string_literal(item) |
| 394 | |
| 395 | def test_get_valid_filename(self): |
| 396 | filename = "^&'@{}[],$=!-#()%+~_123.txt" |
| 397 | self.assertEqual(text.get_valid_filename(filename), "-_123.txt") |
| 398 | self.assertEqual(text.get_valid_filename(lazystr(filename)), "-_123.txt") |
| 399 | msg = "Could not derive file name from '???'" |
| 400 | with self.assertRaisesMessage(SuspiciousFileOperation, msg): |
| 401 | text.get_valid_filename("???") |
| 402 | # After sanitizing this would yield '..'. |
| 403 | msg = "Could not derive file name from '$.$.$'" |
| 404 | with self.assertRaisesMessage(SuspiciousFileOperation, msg): |
| 405 | text.get_valid_filename("$.$.$") |
| 406 | |
| 407 | def test_compress_sequence(self): |
| 408 | data = [{"key": i} for i in range(100)] |
nothing calls this directly
no test coverage detected