def test_07_report_without_spell_with_start_time_without_end_time(self): with self.assertRaises(ValueError): report_model, cr, uid = self.report_model, self.cr, self.uid test_reports.try_report(cr, uid, report_model, [], data={ 'spell_id': None, 'start_time': self.start_time, 'end_time': None })
def test_xlsx(self): with enable_test_report_directory(): self.report_instance.export_xls() # get action test_reports.try_report(self.env.cr, self.env.uid, 'mis.report.instance.xlsx', [self.report_instance.id], report_type='xlsx')
def test_qweb(self): with enable_test_report_directory(): self.report_instance.print_pdf() # get action test_reports.try_report(self.env.cr, self.env.uid, 'mis_builder.report_mis_report_instance', [self.report_instance.id], report_type='qweb-pdf')
def test_04_report_with_spell_without_start_time_with_end_time(self): report_model, cr, uid = self.report_model, self.cr, self.uid report_test = test_reports.try_report(cr, uid, report_model, [], data={ 'spell_id': self.spell_id, 'start_time': None, 'end_time': self.end_time }) self.assertEqual(report_test, True, 'Unable to print Observation Report')
def test_observation_report_without_dob(self): """ Test that when patient doesn't have DOB that it doesn't break report """ report_model, cr, uid = self.report_model, self.cr, self.uid report_test = test_reports.try_report( cr, uid, report_model, [], data={ 'spell_id': self.spell_id, 'start_time': None, 'end_time': None }) self.assertEqual(report_test, True, 'Unable to print Observation Report')
def test_observation_report_without_dob(self): """ Test that when patient doesn't have DOB that it doesn't break report """ report_model, cr, uid = self.report_model, self.cr, self.uid report_test = test_reports.try_report(cr, uid, report_model, [], data={ 'spell_id': self.spell_id, 'start_time': None, 'end_time': None }) self.assertEqual(report_test, True, 'Unable to print Observation Report')
def test_03_report_with_spell_with_start_time_with_end_time(self): old_triggered_ews_data = copy.deepcopy(self.triggered_ews_data) self.triggered_ews_data = { 'data_model': 'nh.clinical.patient.observation.ews', } old_move_data = copy.deepcopy(self.move_data) self.move_data = False report_model, cr, uid = self.report_model, self.cr, self.uid report_test = test_reports.try_report(cr, uid, report_model, [], data={ 'spell_id': self.spell_id, 'start_time': self.start_time, 'end_time': self.end_time }) self.assertEqual(report_test, True, 'Unable to print Observation Report') self.triggered_ews_data = old_triggered_ews_data self.move_data = old_move_data
def test_xlsx(self): test_reports.try_report(self.env.cr, self.env.uid, 'mis.report.instance.xlsx', [self.report_instance.id], report_type='xlsx')
def test_qweb(self): test_reports.try_report(self.env.cr, self.env.uid, 'mis_builder.report_mis_report_instance', [self.report_instance.id], report_type='qweb-pdf')
def test_09_observation_report_without_data(self): report_model, cr, uid = self.report_model, self.cr, self.uid with self.assertRaises(ValueError): test_reports.try_report(cr, uid, report_model, [])