autobahn.twisted.test.test_tx_protocol


Module Contents

Classes

ExceptionHandlingTests

Tests that we format various exception variations properly during

Hixie76RejectionTests

Hixie-76 should not be accepted by an Autobahn server.

WebSocketOriginMatching

Test that we match Origin: headers properly, when asked to

WebSocketXForwardedFor

Test that (only) a trusted X-Forwarded-For can replace the peer address.

OnConnectingTests

Tests related to onConnecting callback

class autobahn.twisted.test.test_tx_protocol.ExceptionHandlingTests(methodName='runTest')[source]

Bases: twisted.trial.unittest.TestCase

Tests that we format various exception variations properly during connectionLost

setUp()[source]

Hook method for setting up the test fixture before exercising it.

tearDown()[source]

Hook method for deconstructing the test fixture after testing it.

test_connection_done()[source]
test_connection_aborted()[source]
test_connection_lost()[source]
test_connection_lost_arg()[source]
class autobahn.twisted.test.test_tx_protocol.Hixie76RejectionTests(methodName='runTest')[source]

Bases: twisted.trial.unittest.TestCase

Hixie-76 should not be accepted by an Autobahn server.

test_handshake_fails()[source]

A handshake from a client only supporting Hixie-76 will fail.

class autobahn.twisted.test.test_tx_protocol.WebSocketOriginMatching(methodName='runTest')[source]

Bases: twisted.trial.unittest.TestCase

Test that we match Origin: headers properly, when asked to

setUp()[source]

Hook method for setting up the test fixture before exercising it.

tearDown()[source]

Hook method for deconstructing the test fixture after testing it.

test_match_full_origin()[source]
test_match_wrong_scheme_origin()[source]
test_match_origin_secure_scheme()[source]
test_match_origin_documentation_example()[source]

Test the examples from the docs

test_match_origin_examples()[source]

All the example origins from RFC6454 (3.2.1)

test_match_origin_counter_examples()[source]

All the example ‘not-same’ origins from RFC6454 (3.2.1)

test_match_origin_edge()[source]
test_origin_from_url()[source]
test_origin_file()[source]
test_origin_null()[source]
class autobahn.twisted.test.test_tx_protocol.WebSocketXForwardedFor(methodName='runTest')[source]

Bases: twisted.trial.unittest.TestCase

Test that (only) a trusted X-Forwarded-For can replace the peer address.

setUp()[source]

Hook method for setting up the test fixture before exercising it.

tearDown()[source]

Hook method for deconstructing the test fixture after testing it.

test_trusted_addresses()[source]
class autobahn.twisted.test.test_tx_protocol.OnConnectingTests(methodName='runTest')[source]

Bases: twisted.trial.unittest.TestCase

Tests related to onConnecting callback

These tests are testing generic behavior, but are somewhat tied to ‘a framework’ so we’re just testing using Twisted-specifics here.

test_on_connecting_client_fails()[source]
test_on_connecting_client_success()[source]
test_str_transport()[source]
test_str_connecting()[source]