Exemple #1
0
 def test_manage_supervisor_reports_resolved(self, mock_choose_employee, mock_show_table, mock_menu, mock_raw_table, mock_db,
                                    mock_print, mock_input):
     mock_menu().draw_menu.return_value = 'RESOLVED'
     admin = Admin()
     admin.manage_supervisor_reports()
     mock_menu().draw_menu.assert_called_once()
     mock_raw_table.assert_called_once()
Exemple #2
0
 def test_manage_supervisor_reports_wip_no_accident(self, mock_choose_employee, mock_show_table, mock_menu, mock_raw_table, mock_db,
                                    mock_print, mock_input):
     mock_menu().draw_menu.return_value = 'WIP'
     mock_show_table.return_value = None
     admin = Admin()
     admin.manage_supervisor_reports()
     mock_menu().draw_menu.assert_called_once()
     mock_db().show_status_accident_report.assert_called_once()
Exemple #3
0
 def test_manage_supervisor_reports_wip(self, mock_choose_employee, mock_show_table, mock_menu, mock_raw_table, mock_db,
                                    mock_print, mock_input):
     mock_menu().draw_menu.return_value = 'WIP'
     mock_choose_employee.return_value = ['1', '2']
     admin = Admin()
     admin.manage_supervisor_reports()
     mock_menu().draw_menu.assert_called_once()
     mock_db().commit_data.assert_called_once()
     mock_db().insert_finalize_report.assert_called_once()
     mock_db().close_accident_cases.assert_called_once()