Skip to content

Commit

Permalink
Added tests to cover pass only methods
Browse files Browse the repository at this point in the history
  • Loading branch information
asgibson committed Oct 11, 2023
1 parent 4190a61 commit 3adf4c5
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/onair/src/ai_components/test_learners_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
33 changes: 33 additions & 0 deletions test/onair/src/ai_components/test_planners_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


0 comments on commit 3adf4c5

Please sign in to comment.