From a7087448a3a879ad8ef6fdc8b5dd0d6f1dd50059 Mon Sep 17 00:00:00 2001 From: Alan Gibson Date: Fri, 6 Oct 2023 16:59:17 -0400 Subject: [PATCH] Added tests to cover pass only methods --- .../ai_components/test_learners_interface.py | 11 +++++++ .../ai_components/test_planners_interface.py | 33 +++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/test/onair/src/ai_components/test_learners_interface.py b/test/onair/src/ai_components/test_learners_interface.py index 9bd737e4..516a2644 100644 --- a/test/onair/src/ai_components/test_learners_interface.py +++ b/test/onair/src/ai_components/test_learners_interface.py @@ -178,6 +178,17 @@ def test_LearnersInterface_apriori_training_calls_apriori_training_on_each_ai_co assert cut.ai_constructs[i].apriori_training.call_args_list[0].args == (arg_batch_data, ) assert result == None +# check_for_salient_event +def test_salient_event_does_nothing(): + # Arrange + cut = LearnersInterface.__new__(LearnersInterface) + + # Act + result = cut.check_for_salient_event() + + # Assert + assert result == None + # render_reasoning tests def test_LearnersInterface_render_reasoning_returns_empty_dict_when_instance_ai_constructs_is_empty(mocker): # Arrange diff --git a/test/onair/src/ai_components/test_planners_interface.py b/test/onair/src/ai_components/test_planners_interface.py index 032b9b86..e95ef49e 100644 --- a/test/onair/src/ai_components/test_planners_interface.py +++ b/test/onair/src/ai_components/test_planners_interface.py @@ -96,4 +96,37 @@ def test_PlannersInterfacee__init__sets_instance_ai_constructs_to_a_list_of_the_ assert cut.ai_constructs == expected_ai_constructs +def test_update_does_nothing(): + # Arrange + arg_curr_raw_tlm = MagicMock() + arg_status = MagicMock() + + cut = PlannersInterface.__new__(PlannersInterface) + + # Act + result = cut.update(arg_curr_raw_tlm, arg_status) + + # Assert + assert result == None + +def test_check_for_salient_event_does_nothing(): + # Arrange + cut = PlannersInterface.__new__(PlannersInterface) + + # Act + result = cut.check_for_salient_event() + + # Assert + assert result == None + +def test_render_reasoning_does_nothing(): + # Arrange + cut = PlannersInterface.__new__(PlannersInterface) + + # Act + result = cut.render_reasoning() + + # Assert + assert result == None +