create_body() and update_body() should be overridden by
concrete child classes. The bodies of these two methods are encoded to JSON
and used as the bodies of HTTP requests for creating and updating a
repository, respectively. Be careful to return appropriate data when
overriding these methods: the various test* methods assume the
repository is fairly simple.

This test case provides set-up and tear-down behaviour that is common to
many API test cases. It is not necessary to use this class as the parent of
all API test cases, but it serves well in many cases.

Talk to the host named by server_config and use simple heuristics to
determine which AMQP broker is installed. If Qpid or RabbitMQ appear to be
installed, return the name of that service. Otherwise, raise an exception.

Upload a content unit to a Pulp server and import it into a repository.

This procedure only works for some unit types, such as rpm or
python_package. Others, like package_group, require an alternate
procedure. The procedure encapsulated by this function is as follows:

Create an upload request.

Upload the content unit to Pulp, in small chunks.

Import the uploaded content unit into a repository.

Delete the upload request.

The default set of parameters sent to Pulp during step 3 are:

{'unit_key':{},'upload_id':'…'}

The actual parameters required by Pulp depending on the circumstances, and
the parameters sent to Pulp may be customized via the import_params
argument. For example, if uploading a Python content unit,
import_params should be the following: