Exemplo n.º 1
0
 def create_report(self, title, query, description):
     """Create a new report with the given title, query, and description"""
     self.go_to_front()
     tc.follow(r"\bView Tickets\b")
     tc.submit(formname='create_report')
     tc.find('New Report')
     tc.notfind(internal_error)
     tc.formvalue('edit_report', 'title', title)
     tc.formvalue('edit_report', 'description', description)
     tc.formvalue('edit_report', 'query', query)
     tc.submit()
     reportnum = b.get_url().split('/')[-1]
     # TODO: verify the url is correct
     # TODO: verify the report number is correct
     # TODO: verify the report does not cause an internal error
     # TODO: verify the title appears on the report list
     return reportnum
Exemplo n.º 2
0
 def create_report(self, title, query, description):
     """Create a new report with the given title, query, and description"""
     self.go_to_front()
     tc.follow('View Tickets')
     tc.formvalue('create_report', 'action', 'new') # select the right form
     tc.submit()
     tc.find('New Report')
     tc.notfind(internal_error)
     tc.formvalue('edit_report', 'title', title)
     tc.formvalue('edit_report', 'description', description)
     tc.formvalue('edit_report', 'query', query)
     tc.submit()
     reportnum = b.get_url().split('/')[-1]
     # TODO: verify the url is correct
     # TODO: verify the report number is correct
     # TODO: verify the report does not cause an internal error
     # TODO: verify the title appears on the report list
     return reportnum