def METHOD_NAME(self):
    dir_loader = loader.DirectoryLoader(Config.empty())
    with tempfile.TemporaryDirectory() as temp_dir:
        with open(f"{temp_dir}/policy.yaml", "w+") as f:
            json.dump(
                {"policies": [{'name': 'test', 'resource': 's3'}]}, f
            )
        with open(f"{temp_dir}/policy2.yaml", "w+") as f:
            json.dump(
                {"policies": [{'name': 'test', 'resource': 'ec2'}]}, f
            )
        with self.assertRaises(PolicyValidationError):
            dir_loader.load_directory(temp_dir)