Where I’m at now, we just have super thin wrappers around the raw python libraries, i.e. we have client libraries that are tiny wrappers around
requests, i.e. methods like
create_account(payload) where payload is the python dict representation of the payload.
Similarly, we have convenience methods that wrap
pika (rabbitmq library for python) that publish to queues and read from queues, as well as bind temporary queues to multiplexing exchanges so that tests can read the queues w/o affecting the applications under test that are also reading the queues for downstream processing.
And then we just wrap all that together in a test method in the
unittest library. A sample test for us would likely have the creation of the ephemeral queue in the
setup, and a test might make a request, then we read something from the queue, run our assertions, and then have a
teardown that unbinds the queue.