beat.web.experiments.tests module

class beat.web.experiments.tests.ExperimentTestBase(methodName='runTest')[source]

Bases: beat.web.common.testutils.BaseTestCase

DECLARATION1 = {'analyzers': {'analysis': {'algorithm': 'johndoe/analysis/1', 'inputs': {'in': 'input'}, 'parameters': {}}}, 'blocks': {'addition1': {'algorithm': 'johndoe/sum/1', 'inputs': {'a': 'a', 'b': 'b'}, 'outputs': {'sum': 'sum'}, 'parameters': {}}, 'addition2': {'algorithm': 'johndoe/sum/1', 'inputs': {'a': 'a', 'b': 'b'}, 'outputs': {'sum': 'sum'}, 'parameters': {}}}, 'datasets': {'dataset1': {'database': 'integers/1', 'protocol': 'triple', 'set': 'default'}}, 'globals': {'environment': {'name': 'env1', 'version': '1.0'}, 'queue': 'queue1'}}
DECLARATION2 = {'analyzers': {'analysis': {'algorithm': 'johndoe/analysis/1', 'inputs': {'in': 'input'}, 'parameters': {}}}, 'blocks': {'addition1': {'algorithm': 'johndoe/sum/1', 'inputs': {'a': 'a', 'b': 'b'}, 'outputs': {'sum': 'sum'}, 'parameters': {}}}, 'datasets': {'dataset1': {'database': 'integers/1', 'protocol': 'triple', 'set': 'default'}}, 'globals': {'environment': {'name': 'env1', 'version': '1.0'}, 'queue': 'queue1'}}
DATABASE = {'protocols': [{'name': 'triple', 'template': 'test', 'sets': [{'name': 'default', 'template': 'set', 'view': 'dummy', 'outputs': {'output1': 'johndoe/single_integer/1', 'output2': 'johndoe/single_integer/1', 'output3': 'johndoe/single_integer/1'}}]}], 'root_folder': '/path/to/root_folder'}
setUp()[source]

Hook method for setting up the test fixture before exercising it.

tearDown()[source]

Hook method for deconstructing the test fixture after testing it.

login(username)[source]
login_johndoe()[source]
login_jackdoe()[source]
class beat.web.experiments.tests.ExperimentCreationAPI(methodName='runTest')[source]

Bases: beat.web.experiments.tests.ExperimentTestBase

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_no_access_for_anonymous_user()[source]
test_bad_request_with_invalid_content_type()[source]
test_bad_request_with_unknown_toolchain()[source]
test_bad_request_without_declaration()[source]
test_bad_request_with_invalid_declaration()[source]
test_bad_request_with_unknown_global_environment_name()[source]
test_bad_request_with_unknown_global_environment_version()[source]
test_bad_request_with_unknown_algorithm_environment_name()[source]
test_bad_request_with_unknown_algorithm_environment_version()[source]
test_bad_request_with_unknown_analyzer_environment_name()[source]
test_bad_request_with_unknown_analyzer_environment_version()[source]
test_bad_request_with_unusable_global_environment()[source]
test_bad_request_with_unusable_algorithm_environment()[source]
test_bad_request_with_unusable_analyzer_environment()[source]
test_valid_experiment()[source]
class beat.web.experiments.tests.ExperimentDeletionAPI(methodName='runTest')[source]

Bases: beat.web.experiments.tests.ExperimentTestBase

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_valid_experiment()[source]
test_attested_experiment()[source]
class beat.web.experiments.tests.ExperimentModificationAPI(methodName='runTest')[source]

Bases: beat.web.experiments.tests.ExperimentTestBase

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_no_access_for_anonymous_user()[source]
test_no_access_for_other_user()[source]
test_bad_request_with_invalid_content_type()[source]
test_bad_request_with_unknown_toolchain()[source]
test_bad_request_with_invalid_declaration()[source]
test_name_modification()[source]
test_description_modification()[source]
class beat.web.experiments.tests.ExperimentStartingAPI(methodName='runTest')[source]

Bases: beat.web.experiments.tests.ExperimentTestBase

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_no_access_for_anonymous_user()[source]
test_no_access_for_other_user()[source]
test_start_experiment()[source]
test_start_team_shared_experiment()[source]
test_start_user_shared_experiment()[source]
test_start_experiment_with_private_database()[source]
class beat.web.experiments.tests.ResultsAPI(methodName='runTest')[source]

Bases: beat.web.experiments.tests.ExperimentTestBase

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_no_retrieval_for_anonymous_user()[source]
test_bad_retrieval_request_with_unknown_experiment()[source]
test_bad_retrieval_request_with_unknown_attestation_number()[source]
test_retrieve_scheduled_experiment()[source]
test_retrieve_running_experiment()[source]
test_retrieve_done_experiment()[source]
test_retrieve_failed_experiment()[source]
test_retrieve_certified_experiment()[source]
test_retrieve_done_experiment_results_data()[source]
test_retrieve_certified_experiment_results()[source]
test_no_started_field()[source]
test_no_done_field()[source]
test_no_blocks_status_field()[source]
test_no_results_field()[source]
class beat.web.experiments.tests.TeamDeletionPropagation(methodName='runTest')[source]

Bases: beat.web.experiments.tests.ExperimentTestBase

setUp()[source]

Hook method for setting up the test fixture before exercising it.

check_shared_objects(user, experiments, toolchains, algorithms)[source]
test_propagation()[source]