Mercury2 Hardware Manager  1.0dev
The hardware manager component of the Mercury2 ground station suite.
 All Classes Namespaces Functions Variables Pages
hwm.sessions.tests.test_session.TestSession Class Reference

This test suite is used to test the functionality of the Session class, which is used to represent user hardware pipeline reservations. More...

Inheritance diagram for hwm.sessions.tests.test_session.TestSession:

Public Member Functions

def setUp
 
def tearDown
 
def test_writing_to_telemetry_protocol
 Tests that the Session class can write telemetry data passed to it to its registered telemetry protocols.
 
def test_writing_to_output_protocol
 This test verifies that the Session class can correctly pass pipeline output from the Pipeline class to its registered data protocols.
 
def test_writing_to_input_stream
 Checks that the Session class can correctly write input data that it receives to its associated pipeline.
 
def test_telemetry_protocol_registration
 Verifies that the Session class can correctly register telemetry protocols. More...
 
def test_data_protocol_registration
 Verifies that the Session class can correctly register data protocols. More...
 
def test_kill_session
 Tests that sessions can be killed and that they notify their pipelines that the session has ended (to give them an opportunity to clean up their resources).
 
def test_session_startup_pipeline_in_use
 Makes sure that the Session class responds appropriately when a session's hardware pipeline can't be reserved.
 
def test_session_startup_pipeline_setup_command_errors
 Tests that the Session class correctly handles fatal pipeline setup command errors when starting a new session.
 
def test_session_startup_error_during_device_session_preparation
 Verifies that the session class can correctly handle errors that may occur during device prepare_for_session() method calls; such errors are supposed to be fatal to the session.
 
def test_session_startup_no_session_setup_commands
 Tests that the Session class can correctly start a session that doesn't specify any session setup commands.
 
def test_session_startup_setup_commands_mixed_success
 Tests that the Session class can correctly start a session based on a reservation that specifies some valid, and invalid, session setup commands. More...
 

Public Attributes

 config
 
 source_data_directory
 
 command_parser
 
 device_manager
 
 pipeline_manager
 
 session_coordinator
 

Private Member Functions

def _load_test_schedule
 Loads a valid test schedule and returns a deferred that will be fired once that schedule has been loaded and parsed. More...
 
def _load_reservation_config
 Returns the configuration dictionary for the specified reservation ID from the complete reservation schedule. More...
 
def _reset_config_entries
 

Detailed Description

This test suite is used to test the functionality of the Session class, which is used to represent user hardware pipeline reservations.

Member Function Documentation

def hwm.sessions.tests.test_session.TestSession._load_reservation_config (   self,
  reservation_schedule,
  reservation_id 
)
private

Returns the configuration dictionary for the specified reservation ID from the complete reservation schedule.

 This is used to pick out individual session configurations to test with.
Exceptions
RaisesLookupError if the specified reservation ID can't be found in the reservation schedule.
def hwm.sessions.tests.test_session.TestSession._load_test_schedule (   self)
private

Loads a valid test schedule and returns a deferred that will be fired once that schedule has been loaded and parsed.

This schedule is used to test the Session class.

def hwm.sessions.tests.test_session.TestSession.test_data_protocol_registration (   self)

Verifies that the Session class can correctly register data protocols.

The Session class uses these data protocols to pass the primary pipeline output stream to the end user.

def hwm.sessions.tests.test_session.TestSession.test_session_startup_setup_commands_mixed_success (   self)

Tests that the Session class can correctly start a session based on a reservation that specifies some valid, and invalid, session setup commands.

Because session setup command errors are considered non-fatal, invalid commands should still leave the session in a running state. This test also verifies that the session:

  • Correctly registers itself with its pipeline (which occurs right before the session setup commands are executed)
  • Successfully executes a valid device command that requires a session for the test pipeline.
  • Fails to execute a device command that specifies a device the user doesn't have permission to execute.
def hwm.sessions.tests.test_session.TestSession.test_telemetry_protocol_registration (   self)

Verifies that the Session class can correctly register telemetry protocols.

The Session class uses telemetry protocols to pass pipeline telemetry data to the end user.


The documentation for this class was generated from the following file: