plainbox.impl.transport – shared code for test data transports

Warning

THIS MODULE DOES NOT HAVE STABLE PUBLIC API

class plainbox.impl.transport.TransportBase(where, option_string)[source]

Base class for transports that send test data somewhere.

They handle just the transmission portion of data sending; exporters are expected to produce data in the proper format (e.g. json, xml).

Each transport can have specific parameters that are required for the other end to properly process received information (like system identification, authorization data and so on), and that don’t semantically belong in the test data as produced by the exporter. Additionally each transport needs to be told where to send test data. This is transport-dependent; things like a HTTP endpoint, IP address, port are good examples.

send(data)[source]

Send data somewhere.

Data is the stream of data to send, its format depends on the receiving end. It should be a file-like object.

plainbox.impl.transport.get_all_transports()[source]

Discover and load all transport classes.

Returns a map of transports (mapping from name to transport class)

Previous topic

plainbox.impl.testing_utils – plainbox specific test tools

Next topic

plainbox.public – public, stable API

This Page