tests.test_hear_server

Module Contents

Classes

McastHearTestSuite

McastServerTestSuite

Test suite for McastServer functionality.

HearUDPHandlerTestSuite

Test suite for validating HearUDPHandler functionality.

Data

__module__

API

tests.test_hear_server.__module__[source]

‘tests’

class tests.test_hear_server.McastHearTestSuite(methodName='runTest')[source][source]

Bases: context.BasicUsageTestSuite

__module__[source]

‘tests.test_hear_server’

__name__[source]

‘tests.test_hear_server.McastHearTestSuite’

static get_default_ip()[source][source]

Get the default IP address of the machine.

Returns: str: The IP address of the default network interface.

Note: Uses 203.0.113.1 (TEST-NET-3) for RFC 5737 compliance. Port 59095 is chosen as an arbitrary high port number.

class tests.test_hear_server.McastServerTestSuite(methodName='runTest')[source][source]

Bases: tests.test_hear_server.McastHearTestSuite

Test suite for McastServer functionality.

This suite verifies the server’s behavior in handling various types of requests, error conditions, and resource management.

Attributes: module (str): Module identifier name (str): Full class name

Initialization

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

__module__[source]

‘tests.test_hear_server’

__name__[source]

‘tests.test_hear_server.McastServerTestSuite’

test_handle_error_without_stop_in_request()[source][source]

Test McastServer.handle_error with a non-STOP request.

Verifies that the server properly handles requests without the STOP command and cleans up resources.

test_handle_error_with_none_request()[source][source]
class tests.test_hear_server.HearUDPHandlerTestSuite(methodName='runTest')[source][source]

Bases: tests.test_hear_server.McastHearTestSuite

Test suite for validating HearUDPHandler functionality.

This suite tests the behavior of the UDP handler with various input combinations, including edge cases with None data and sockets.

Attributes: module (str): Module identifier name (str): Full class name

Initialization

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

__module__[source]

‘tests.test_hear_server’

__name__[source]

‘tests.test_hear_server.HearUDPHandlerTestSuite’

test_handle_with_none_data_and_sock()[source][source]
test_handle_with_data_none_sock()[source][source]
test_handle_with_valid_data_and_sock()[source][source]