def test_update_all_policy_failed(self):
        rule_name = "os_compute_api:server-metadata:update_all"
        self.policy.set_rules({rule_name: "project:non_fake"})
        exc = self.assertRaises(
            exception.PolicyNotAuthorized,
            self.controller.update_all, self.req, fakes.FAKE_UUID,
            body={'metadata': {}})
        self.assertEqual(
            "Policy doesn't allow %s to be performed." % rule_name,
            exc.format_message())
dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/tests/unit/api/openstack/compute/test_server_metadata.py/ServerMetaPolicyEnforcementV21.test_update_all_policy_failed/original