def test_should_normalize_path(self): # Given a non-normalized path path = "/tmp/test/" # When applying split_path() to it components = mongofuse.split_path(path) # Then list of individual components should be returned self.assertEqual(components, ["/", "tmp", "test"])
def test_should_split_path_into_list_of_components(self): # Given a path path = "/tmp/test/my_file.json" # When applying split_path() to it components = mongofuse.split_path(path) # Then list of individual components should be returned self.assertEqual(components, ["/", "tmp", "test", "my_file.json"])