def json(self): return dict(id=self.id, author=self.author.username, title=self.title, description=self.description, case_create_time=str(self.case_create_time), case_update_time=str(self.case_update_time), access=get_access(self.access), usecase_input=self.usecase_input, usecase_output=self.usecase_output, casetype=self.casetype.name, checkBox="<input type='checkbox' name='case' value='" + str(self.id) + "' onclick='setSelectAll();' />" )
def json(self): return dict(id=self.id, author=self.author.username, name=self.name, description=self.description, hudson=get_hudson(self.hudson), times=self.task_excute_times, command=self.command, runtime=self.runtime, timing=self.timing, svn=self.svn, email=self.email, email_topic=self.email_topic, other=self.other, case=str([i.title for i in self.case]), code=str([i.name for i in self.code]), task_create_time=str(self.task_create_time), task_update_time=str(self.task_update_time), access=get_access(self.access), tasktype=self.moduletype.name, machine=self.machine.name)
def access(id): return get_access(id)