waft.framework_unit_tests.test_system.test_clients.test_http_client module

Unit tests for HTTP client functionality.

class waft.framework_unit_tests.test_system.test_clients.test_http_client.TestAgentConnectionAccess

Bases: object

Test agent connection access methods.

test_get_agent_connection_context_manager(http_client)

Test that get_agent_connection is a proper context manager.

test_get_agent_connection_returns_connection_info(http_client)

Test that get_agent_connection returns AgentConnectionInfo.

class waft.framework_unit_tests.test_system.test_clients.test_http_client.TestCommandExecution

Bases: object

Test command execution methods.

test_exec_command_http_error(http_client)

Test command execution with HTTP error.

test_exec_command_no_auto_raise(http_client)

Test command execution without auto-raise.

test_exec_command_success(http_client)

Test successful command execution.

test_exec_command_timeout(http_client)

Test command execution timeout.

test_exec_command_with_failure(http_client)

Test command execution with non-zero exit code.

class waft.framework_unit_tests.test_system.test_clients.test_http_client.TestConnectionManagement

Bases: object

Test connection management methods.

test_reset_connection(http_client, mock_settings)

Test connection reset.

test_test_connection_failure(http_client)

Test failed connection test.

test_test_connection_success(http_client)

Test successful connection test.

class waft.framework_unit_tests.test_system.test_clients.test_http_client.TestEnvironmentVariables

Bases: object

Test environment variable handling.

test_add_env_var(http_client)

Test adding environment variable.

test_add_to_path(http_client)

Test adding to PATH environment variable.

class waft.framework_unit_tests.test_system.test_clients.test_http_client.TestFileTransfer

Bases: object

Test file transfer methods.

test_get_file_http_error(http_client)

Test file download with HTTP error.

test_get_file_success(http_client)

Test successful file download.

test_send_file_http_error(http_client)

Test file upload with HTTP error.

test_send_file_not_found(http_client)

Test file upload with missing local file.

test_send_file_success(http_client)

Test successful file upload.

class waft.framework_unit_tests.test_system.test_clients.test_http_client.TestHttpClientInitialization

Bases: object

Test HTTP client initialization.

test_client_initialization(mock_settings, connection_details)

Test that client initializes correctly.

test_custom_port(mock_settings)

Test that client uses custom port from configuration.

test_missing_token_file(connection_details)

Test that missing token file raises error.

class waft.framework_unit_tests.test_system.test_clients.test_http_client.TestPortBinding

Bases: object

Test port binding method.

test_bind_remote_port_to_local(http_client)

Test that port binding returns remote port (no-op for HTTP).

waft.framework_unit_tests.test_system.test_clients.test_http_client.connection_details()

Create mock connection details.

waft.framework_unit_tests.test_system.test_clients.test_http_client.http_client(mock_settings, connection_details)

Create HTTP client instance for testing.

waft.framework_unit_tests.test_system.test_clients.test_http_client.mock_settings()

Mock settings for testing.