Skip to content

Updates needed to tests. #52

@davidraker

Description

@davidraker

Various updates are needed to test suite, including:

  • remove hard-coding of library paths in test_agent_integ and test_agent_polling_integration.
  • Same files have a broken import of InstallAgentOptions which no longer exists in platformwrapper. This is currenlty commented so test suite will run.
  • The following 29 failures were recorded. Many appear to be related to API changes:
    ============================================================================= short test summary info ==============================================================================
    FAILED tests/test_agent_integ_test_server.py::test_basic_get_set - ValueError: No equipment found for topic: devices/campus/building/fake/SampleWritableFloat1
    FAILED tests/test_agent_integ_test_server.py::test_get_multiple_points - AssertionError: assert {} == {'devices/cam...leFloat2': 15}
    FAILED tests/test_agent_integ_test_server.py::test_override_on_off - AssertionError: assert 'devices/campus/building/fake' in []
    FAILED tests/test_agent_integ_test_server.py::test_poll_schedule - AssertionError: Poll schedule should not be empty.
    FAILED tests/test_agent_integ_test_server.py::test_scrape_all - AssertionError: assert {} == ({'devices/ca...5.0, ...}, {})
    FAILED tests/test_agent_integ_test_server.py::test_semantic_get_set - ValueError: No equipment found for topic: devices/campus/building/fake/SampleWritableFloat1
    FAILED tests/test_agent_integ_test_server.py::test_list_topics - treelib.exceptions.NodeIDAbsentError: Node 'devices/campus' is not in the tree
    FAILED tests/test_agent_integ_test_server.py::test_last_and_semantic_last - ValueError: No equipment found for topic: devices/campus/building/fake/SampleWritableFloat1
    FAILED tests/test_agent_integ_test_server.py::test_add_node_device - AssertionError: add_node should return True for a successful add.
    FAILED tests/test_agent_integ_test_server.py::test_remove_node - AssertionError: add_node should return True.
    FAILED tests/test_agent_unit.py::TestPDAConfigureMain::test_configure_main_update_action - AssertionError: assert == 100
    FAILED tests/test_agent_unit.py::TestPDAConfigureMain::test_configure_main_creates_reservation_manager - AssertionError: Expected 'ReservationManager' to have been called once. Called 0 times.
    FAILED tests/test_agent_unit.py::TestPDAUnderscoreSet::test_set_single_value_no_confirm - AttributeError: 'str' object has no attribute 'vip'
    FAILED tests/test_agent_unit.py::TestPDAUnderscoreSet::test_set_single_value_with_confirm - AttributeError: 'str' object has no attribute 'vip'
    FAILED tests/test_agent_unit.py::TestPDAUnderscoreSet::test_set_mapped_values_no_confirm - AttributeError: 'dict' object has no attribute 'vip'
    FAILED tests/test_agent_unit.py::TestPDAUnderscoreSet::test_set_mapped_values_with_confirm - AttributeError: 'dict' object has no attribute 'vip'
    FAILED tests/test_agent_unit.py::TestPDAStartAndStopMethods::test__start_returns_early_if_any_point_active - AssertionError: Point2 should remain inactive.
    FAILED tests/test_agent_unit.py::TestPDAStartAndStopMethods::test__stop_returns_early_if_any_point_inactive - KeyError:
    FAILED tests/test_agent_unit.py::TestHandleRevertDevice::test_handle_revert_device_success - AssertionError: expected call not found.
    FAILED tests/test_agent_unit.py::TestGetHeaders::test_get_headers_no_optional - AssertionError: assert {'requesterID...773838+00:00'} == {'requesterID... 'type': None}
    FAILED tests/test_agent_unit.py::TestGetHeaders::test_get_headers_with_time - AssertionError: assert {'requesterID...52:29.037938'} == {'requesterID... 'type': None}
    FAILED tests/test_agent_unit.py::TestGetHeaders::test_get_headers_with_task_id - AssertionError: assert {'requesterID...773838+00:00'} == {'requesterID... 'type': None}
    FAILED tests/test_equipment_unit.py::TestEquipmentNodeGetRemote::test_get_remote_is_device_true - AttributeError: 'EquipmentNode' object has no attribute 'get_remote'
    FAILED tests/test_equipment_unit.py::TestEquipmentNodeGetRemote::test_get_remote_is_device_false - AttributeError: 'EquipmentNode' object has no attribute 'get_remote'
    FAILED tests/test_poll_scheduler_unit.py::test_poll_scheduler_init - TypeError: Can't instantiate abstract class PollScheduler with abstract methods _prepare_to_schedule, _schedule_polling, get_schedule
    FAILED tests/test_poll_scheduler_unit.py::test_poll_scheduler_schedule - TypeError: Can't instantiate abstract class PollScheduler with abstract methods _prepare_to_schedule, _schedule_polling, get_schedule
    FAILED tests/test_poll_scheduler_unit.py::TestPollSchedulerAddToSchedule::test_add_to_schedule_reschedule_required_new_group - ValueError: not enough values to unpack (expected 2, got 0)
    FAILED tests/test_poll_scheduler_unit.py::TestPollSchedulerAddToSchedule::test_add_to_schedule_reschedule_required_new_remote - ValueError: not enough values to unpack (expected 2, got 0)
    FAILED tests/test_poll_scheduler_unit.py::TestPollSetRemoveFromPublishSetup::test_remove_from_publish_setup - AssertionError: assert 'point1' not in {'point1'}
    ERROR tests/test_agent_integ.py::test_revert_point[volttron_instance0] - TypeError: 'NoneType' object is not callable
    ERROR tests/test_agent_integ.py::test_revert_device[volttron_instance0] - TypeError: 'NoneType' object is not callable
    ERROR tests/test_agent_integ.py::test_pubsub_get_point[volttron_instance0] - TypeError: 'NoneType' object is not callable
    ERROR tests/test_agent_integ.py::test_pubsub_set_point[volttron_instance0] - TypeError: 'NoneType' object is not callable
    ERROR tests/test_agent_integ.py::test_pubsub_revert_device[volttron_instance0] - TypeError: 'NoneType' object is not callable
    ERROR tests/test_agent_integ.py::test_pubsub_schedule_request[volttron_instance0] - TypeError: 'NoneType' object is not callable
    ERROR tests/test_agent_integ.py::test_pubsub_get_nonexistent_point[volttron_instance0] - TypeError: 'NoneType' object is not callable
    ERROR tests/test_agent_integ.py::test_poll_scheduler_basic[volttron_instance0] - TypeError: 'NoneType' object is not callable
    ERROR tests/test_agent_polling_integration.py::test_interval_publishes[volttron_instance0] - TypeError: 'NoneType' object is not callable
    ERROR tests/test_data_structures.py::test_build_equipment_tree - TypeError: DriverAgent.init() missing 4 required positional arguments: 'scalability_test', 'tz', 'unique_id', and 'vip'
    ERROR tests/test_equipment_unit.py::TestEquipmentTreeAddSegment::test_add_segment_successful - TypeError: EquipmentTree.init() missing 1 required positional argument: 'agent'
    ERROR tests/test_equipment_unit.py::TestEquipmentTreeAddSegment::test_add_segment_with_config - TypeError: EquipmentTree.init() missing 1 required positional argument: 'agent'
    ERROR tests/test_equipment_unit.py::TestEquipmentTreeAddSegment::test_add_segment_with_existing_node - TypeError: EquipmentTree.init() missing 1 required positional argument: 'agent'
    ERROR tests/test_equipment_unit.py::TestEquipmentTreeAddSegment::test_add_segment_partial_existing_nodes - TypeError: EquipmentTree.init() missing 1 required positional argument: 'agent'
    ERROR tests/test_initialization.py::test_get_or_create_remote[2-config_contents0-True] - TypeError: PlatformDriverAgent.init() takes 1 positional argument but 2 were given
    ERROR tests/test_initialization.py::test_get_or_create_remote[2-config_contents1-False] - TypeError: PlatformDriverAgent.init() takes 1 positional argument but 2 were given
    ERROR tests/test_initialization.py::test_get_or_create_remote[1-config_contents2-True] - TypeError: PlatformDriverAgent.init() takes 1 positional argument but 2 were given
    ERROR tests/test_initialization.py::test_get_or_create_remote[1-config_contents3-False] - TypeError: PlatformDriverAgent.init() takes 1 positional argument but 2 were given
    ERROR tests/test_initialization.py::test_get_or_create_remote[2-config_contents4-False] - TypeError: PlatformDriverAgent.init() takes 1 positional argument but 2 were given
    ERROR tests/test_initialization.py::test_get_or_create_remote[2-config_contents5-False] - TypeError: PlatformDriverAgent.init() takes 1 positional argument but 2 were given
    ERROR tests/test_initialization.py::test_get_or_create_remote[2-config_contents6-False] - TypeError: PlatformDriverAgent.init() takes 1 positional argument but 2 were given
    ERROR tests/test_initialization.py::test_configure_new_equipment[TestInterface-NEW] - TypeError: PlatformDriverAgent.init() takes 1 positional argument but 2 were given
    ERROR tests/test_initialization.py::test_configure_new_equipment[None-NEW] - TypeError: PlatformDriverAgent.init() takes 1 positional argument but 2 were given
    ERROR tests/test_queries.py::test_build_query_plan - TypeError: PlatformDriverAgent.init() takes 1 positional argument but 2 were given
    ERROR tests/test_queries.py::test_get - TypeError: PlatformDriverAgent.init() takes 1 positional argument but 2 were given
    ======================================================== 29 failed, 304 passed, 7 skipped, 29 warnings, 25 errors in 5.14s ======

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions