- def test_url_sanitize_consecutive_slashes(self):
- self.assertEqual(url_sanitize_consecutive_slashes(
- 'http://hostname/foo//bar/filename.html'),
- 'http://hostname/foo/bar/filename.html')
- self.assertEqual(url_sanitize_consecutive_slashes(
- 'http://hostname//foo/bar/filename.html'),
- 'http://hostname/foo/bar/filename.html')
- self.assertEqual(url_sanitize_consecutive_slashes(
- 'http://hostname//'), 'http://hostname/')
- self.assertEqual(url_sanitize_consecutive_slashes(
- 'http://hostname/foo/bar/filename.html'),
- 'http://hostname/foo/bar/filename.html')
- self.assertEqual(url_sanitize_consecutive_slashes(
- 'http://hostname/'), 'http://hostname/')
-