woob.tools.test

class BackendTest(*args, **kwargs)[source]

Bases: TestCase

MODULE = None
login_cb(backend_name, value)[source]
run(result)[source]

Call the parent run() for each backend instance. Skip the test if we have no backends.

shortDescription()[source]

Generate a description with the backend instance name.

is_backend_configured()[source]

Check if the backend is in the user configuration file

assertNotEmpty(obj, *args)[source]

Assert an object is neither empty in the BaseObject parlance.

obj should not be None, NotLoaded, or NotAvailable.

exception SkipTest[source]

Bases: Exception

Raise this exception in a test to skip it.

Usually you can use TestCase.skipTest() or one of the skipping decorators instead of raising this directly.

skip_without_config(*keys)[source]

Decorator to skip a test if backend config is missing

Parameters:

keys – if any of these keys is missing in backend config, skip test. Can be empty.