def test_perform_action__SAVE(self, mocked_func): app_functions.perform_action(self.inv_class, "SAVE") self.assertTrue(mocked_func.called)
def test_perform_action__EXIT(self, mocked_func): with captured_output() as (outputs, errors): app_functions.perform_action(self.inv_class, "EXIT") self.assertTrue(mocked_func.called)
def test_perform_action__TO_HTML(self, mocked_func, mock_inputs): mock_inputs.side_effect = ["Y"] with captured_output() as (outputs, errors): app_functions.perform_action(self.inv_class, "TO HTML") self.assertTrue(mocked_func.called)