Ejemplo n.º 1
0
    def load_path_list(self):
        """
            Loads a list of artifact paths from the cloud.  This does
            NOT include metadata or special private data.

            Returns:
                List(basestring)
        """
        with self.bucket_container.create_cloud_storage() as storage:
            artifact_list = storage.get_directory_contents("", True)
            path_list = filters.to_path_list(artifact_list)
            path_list = filters.directories(path_list)
            path_list = filters.all_private(path_list)

        return path_list
Ejemplo n.º 2
0
    def test_directories(self):
        path_list = [
            "/sup",
            "directory1/",
            "/blah/hello",
            "directory2/",
        ]

        expected_list = [
            "/sup",
            "/blah/hello"
        ]

        filtered_path_list = akfilter.directories(path_list)
        self.assertEqual(expected_list, filtered_path_list)