Example #1
0
 def test_folder_path_remove_multiple_slashes(self):
     self.assertEqual(normalise_folder_path('/path//to/folder///'),
                      '/path/to/folder')
Example #2
0
 def test_folder_path_with_trailing_slash(self):
     self.assertEqual(normalise_folder_path('/path/to/folder/'),
                      '/path/to/folder')
Example #3
0
 def test_folder_path_slashes_reversed(self):
     self.assertEqual(normalise_folder_path('path/to/folder/'),
                      '/path/to/folder')
Example #4
0
 def test_already_normalised_folder_path(self):
     self.assertEqual(normalise_folder_path('/path/to/folder'),
                      '/path/to/folder')
Example #5
0
 def test_folder_path_without_leading_slash(self):
     self.assertEqual(normalise_folder_path('path/to/folder'),
                      '/path/to/folder')
Example #6
0
 def test_folder_path_remove_multiple_slashes(self):
     self.assertEqual(normalise_folder_path('/path//to/folder///'),
                      '/path/to/folder')
Example #7
0
 def test_empty_folder_path(self):
     self.assertEqual(normalise_folder_path(''),'/')
Example #8
0
 def test_folder_path_slashes_reversed(self):
     self.assertEqual(normalise_folder_path('path/to/folder/'),
                      '/path/to/folder')
Example #9
0
 def test_folder_path_with_trailing_slash(self):
     self.assertEqual(normalise_folder_path('/path/to/folder/'),
                      '/path/to/folder')
Example #10
0
 def test_folder_path_without_leading_slash(self):
     self.assertEqual(normalise_folder_path('path/to/folder'),
                      '/path/to/folder')
Example #11
0
 def test_already_normalised_folder_path(self):
     self.assertEqual(normalise_folder_path('/path/to/folder'),
                      '/path/to/folder')
Example #12
0
 def test_empty_folder_path(self):
     self.assertEqual(normalise_folder_path(''), '/')