def update(self, case_id, **attributes):
response = self._thehive.do_patch("<STR_LIT>".format(case_id), **attributes)<EOL>if response.status_code == requests.codes.unauthorized:<EOL><INDENT>raise TheHiveException("<STR_LIT>")<EOL><DEDENT>if self.status_ok(response.status_code):<EOL><INDENT>return self(response.json()['<STR_LIT:id>'])<EOL><DEDENT>else:<EOL><INDENT>raise CaseException("<STR_LIT>".format(response.status_code, response.text))<EOL><DEDENT>
Update a case.        
:param case_id: The ID of the case to update
:param attributes: key=value pairs of case attributes to update (field=new_value)

:return: The created instance.