conftest

class test.unit.conftest.CommonIntercomMock(*_, **__)

Bases: object

add_analysis_task(task)
static add_binary_search_request(*_)
add_compare_task(compare_id, force=False)
add_re_analyze_task(task, unpack=True)
get_available_analysis_plugins()
static get_binary_and_filename(uid)
static get_binary_search_result(uid)
static get_repacked_binary_and_file_name(uid)
static peek_in_binary(*_)
shutdown()
task_list = None
class test.unit.conftest.FrontendDatabaseMock(db_mock)

Bases: object

A class mocking FrontendDatabase.

Parameters:

db_mock (CommonDatabaseMock) –

class test.unit.conftest.StatusInterfaceMock

Bases: object

get_analysis_status()
set_analysis_status(status)
Parameters:

status (dict) –

class test.unit.conftest.WebInterfaceUnitTestConfig(*args, **kwargs)

Bases: BaseModel

A class configuring the web_frontend() fixture.

Parameters:
  • args (Any) –

  • kwargs (Any) –

Return type:

Any

database_mock_class

A class that can be instanced to mock every @property of FrontendDatabase. See also: The documentation of FrontendDatabaseMock

alias of CommonDatabaseMock

intercom_mock_class

A class mocking InterComFrontEndBinding

alias of CommonIntercomMock

status_mock_class

A class mocking RedisStatusInterface

alias of StatusInterfaceMock

test.unit.conftest.intercom_task_list()

A fixture used to add tasks in the CommonIntercomMock. It can be used to inspect what tasks where added

Return type:

list

test.unit.conftest.test_client(web_frontend)

Shorthand for web_frontend.app.test_client

test.unit.conftest.web_frontend(request, monkeypatch, intercom_task_list)

Returns an instance of WebFrontEnd. This fixture can be configured by providing an instance of WebInterfaceUnitTestConfig as a marker called WebInterfaceUnitTestConfig.

See also

The fixture intercom_task_list().

Return type:

WebFrontEnd