def test_accident_complains_wip_remove(self, mock_db, mock_print, mock_input, mock_table_menu, mock_menu, mock_remove_supervisor, mock_add_supervisor): mock_menu().draw_menu.side_effect = ['WIP', 'REMOVE_SUPERVISOR'] mock_table_menu.side_effect = ['', 'None'] admin = Admin() admin.accident_complains() mock_remove_supervisor.assert_called_once()
def test_accident_complains_wip_remove_no_member(self, mock_db, mock_print, mock_input, mock_table_menu, mock_menu, mock_remove_supervisor, mock_add_supervisor): mock_menu().draw_menu.side_effect = ['WIP', 'REMOVE_SUPERVISOR'] mock_table_menu.side_effect = ['', None] admin = Admin() admin.accident_complains() self.assertEqual(2, mock_table_menu.call_count)
def test_accident_complains_back(self, mock_db, mock_print, mock_input, mock_table_menu, mock_menu, mock_remove_supervisor, mock_add_supervisor): mock_menu().draw_menu.return_value = 'BACK' admin = Admin() admin.accident_complains() mock_input.assert_called_once() mock_menu().draw_menu.assert_called_once()