def update_case(self, case, fields=[]):
req = self.url + "<STR_LIT>".format(case.id)<EOL>update_keys = [<EOL>'<STR_LIT:title>', '<STR_LIT:description>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT:status>', '<STR_LIT>',<EOL>'<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>'<EOL>]<EOL>data = {k: v for k, v in case.__dict__.items() if (len(fields) > <NUM_LIT:0> and k in fields) or (len(fields) == <NUM_LIT:0> and k in update_keys)}<EOL>try:<EOL><INDENT>return requests.patch(req, headers={'<STR_LIT:Content-Type>': '<STR_LIT:application/json>'}, json=data, proxies=self.proxies, auth=self.auth, verify=self.cert)<EOL><DEDENT>except requests.exceptions.RequestException:<EOL><INDENT>raise CaseException("<STR_LIT>".format(e))<EOL><DEDENT>
Update a case.
:param case: The case to update. The case's `id` determines which case to update.
:param fields: Optional parameter, an array of fields names, the ones we want to update
:return: