def METHOD_NAME(self, actions):
    policy = {
        "Version": "2012-10-17",
        "Id": "",
        "Statement": [
            {
                "Sid": "test",
                "Effect": "Deny",
                "Principal": "*",
                "Action": actions,
                "Resource": "*",
            }
        ],
    }
    self.client.put_key_policy(
        Policy=json.dumps(policy), PolicyName="default", KeyId=self.key_id
    )
    with pytest.raises(ClientError) as exc:
        self.client.describe_key(KeyId=self.key_id)
    err = exc.value.response["Error"]
    assert err["Code"] == "AccessDeniedException"