def test_decode_path(self): self.assertIsNone(Helper.decode_path("")) with self.assertRaises(TypeError): Helper.decode_path() path = '/some/path with spaces/to/file.txt' encoded_path = '%2Fsome%2Fpath%20with%20spaces%2Fto%2Ffile.txt' self.assertEqual(Helper.decode_path(encoded_path), path.replace('/', Helper.os_separator()))
def test_os_separator(self): self.assertNotEqual(os.sep, '') self.assertEqual(os.sep, Helper.os_separator())