def METHOD_NAME(self):
    dir_loader = loader.DirectoryLoader(Config.empty())
    with tempfile.TemporaryDirectory() as temp_dir:
        mkdir(f"{temp_dir}/layer1")
        with open(f"{temp_dir}/layer1/policy.yaml", "w+") as f:
            json.dump(
                {"policies": [{'name': 'test', 'resource': 's3'}]}, f
            )
        mkdir(f"{temp_dir}/layer1/layer2")
        with open(f"{temp_dir}/layer1/layer2/policy2.yaml", "w+") as f:
            json.dump(
                {"policies": [{'name': 'test2', 'resource': 'ec2'}]}, f
            )
        with open(f"{temp_dir}/policy.3.yaml", "w+") as f:
            json.dump(
                {"policies": [{'name': 'test3', 'resource': 'ebs'}]}, f
            )
        loaded = dir_loader.load_directory(temp_dir)
        self.assertEqual(len(loaded.policies), 3)
        p_names = []
        for p in loaded.policies:
            p_names.append(p.name)
        self.assertEqual(set(p_names), set(['test', 'test2', 'test3']))