Tests for the multithreading Module

Tests for the multithreading module.

Tests for the multithreading.request Submodule

Tests for the multithreading.biomart submodule.

As a thread_local request session is used, and a new session returned only if thread_local does not have one, the thread_local session must be deleted at the start of each test if we are to test initialisation of the Session. We can easily test that the session is only created by calling the method twice with different parameters and testing that the session has the parameters from the first call.

tests.multithreading.test_request.test_clean_session() None

The session does change the default headers/params, if none are passed.

tests.multithreading.test_request.test_has_attr() None

It gives thread local a session attribute.

tests.multithreading.test_request.test_has_session() None

It returns a session.

tests.multithreading.test_request.test_returns_existing() None

It returns an existing thread_local session.

tests.multithreading.test_request.test_updates_headers() None

It updates the headers.

tests.multithreading.test_request.test_updates_params() None

It updates the params.