beat.web.toolchains.tests module

class beat.web.toolchains.tests.ToolchainsCreationFunction(methodName='runTest')[source]

Bases: django.test.testcases.TestCase

DECLARATION = {'analyzers': [{'name': 'analysis', 'inputs': ['in'], 'synchronized_channel': 'dataset1'}], 'blocks': [{'name': 'block1', 'inputs': ['in'], 'outputs': ['out'], 'synchronized_channel': 'dataset1'}], 'connections': [{'from': 'dataset1.output1', 'to': 'block1.in', 'channel': 'dataset1'}, {'from': 'block1.out', 'to': 'analysis.in', 'channel': 'dataset1'}], 'datasets': [{'name': 'dataset1', 'outputs': ['output1']}], 'representation': {'blocks': {}, 'channel_colors': {}, 'connections': {}}}
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.

test_no_declaration()[source]
test_with_valid_declaration()[source]
test_with_invalid_declaration()[source]
class beat.web.toolchains.tests.ToolchainAccessibilityFunctionsBase(methodName='runTest')[source]

Bases: beat.web.common.testutils.BaseTestCase

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.

class beat.web.toolchains.tests.NotSharedToolchain_CheckAccessibilityFunction(methodName='runTest')[source]

Bases: beat.web.toolchains.tests.ToolchainAccessibilityFunctionsBase

test_author_has_access()[source]
test_other_user_has_no_access()[source]
class beat.web.toolchains.tests.PublicForOneUserToolchain_CheckAccessibilityFunction(methodName='runTest')[source]

Bases: beat.web.toolchains.tests.ToolchainAccessibilityFunctionsBase

test_author_has_access()[source]
test_authorized_user_has_full_access()[source]
test_unauthorized_user_has_no_access()[source]
test_mixed_case()[source]
class beat.web.toolchains.tests.PublicForAllUsersToolchain_CheckAccessibilityFunction(methodName='runTest')[source]

Bases: beat.web.toolchains.tests.ToolchainAccessibilityFunctionsBase

test_author_has_access()[source]
test_other_user_has_full_access()[source]
class beat.web.toolchains.tests.NotSharedToolchain_ShareFunction(methodName='runTest')[source]

Bases: beat.web.toolchains.tests.ToolchainAccessibilityFunctionsBase

test_sharing_as_public_for_all()[source]
test_sharing_as_public_for_one_user()[source]
test_sharing_as_public_for_multiple_users()[source]
class beat.web.toolchains.tests.PublicForOneUserToolchain_ShareFunction(methodName='runTest')[source]

Bases: beat.web.toolchains.tests.ToolchainAccessibilityFunctionsBase

test_sharing_as_public_for_all()[source]
test_sharing_as_public_for_the_same_user()[source]
test_sharing_as_public_for_another_user()[source]
test_sharing_as_public_for_multiple_users()[source]
class beat.web.toolchains.tests.PublicForAllToolchain_ShareFunction(methodName='runTest')[source]

Bases: beat.web.toolchains.tests.ToolchainAccessibilityFunctionsBase

test_sharing_as_public_for_all()[source]
test_sharing_as_public_for_one_user()[source]
test_sharing_as_public_for_multiple_users()[source]
class beat.web.toolchains.tests.ToolchainsAPIBase(methodName='runTest')[source]

Bases: beat.web.common.testutils.BaseTestCase

class Meta[source]

Bases: object

model

alias of beat.web.toolchains.models.Toolchain

DECLARATION = {'analyzers': [{'name': 'analysis', 'inputs': ['in'], 'synchronized_channel': 'dataset1'}], 'blocks': [{'name': 'block1', 'inputs': ['in'], 'outputs': ['out'], 'synchronized_channel': 'dataset1'}], 'connections': [{'from': 'dataset1.output1', 'to': 'block1.in', 'channel': 'dataset1'}, {'from': 'block1.out', 'to': 'analysis.in', 'channel': 'dataset1'}], 'datasets': [{'name': 'dataset1', 'outputs': ['output1']}], 'representation': {'blocks': {}, 'channel_colors': {}, 'connections': {}}}
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]
login_janedoe()[source]
class beat.web.toolchains.tests.ToolchainsListRetrieval(methodName='runTest')[source]

Bases: beat.web.toolchains.tests.ToolchainsAPIBase

setUp()[source]

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

test_only_public_and_visible_toolchains_for_anonymous_user()[source]
test_all_accessible_toolchains()[source]
test_own_toolchains()[source]
test_other_user_toolchains()[source]
test_user_toolchains_for_anonymous_user()[source]
class beat.web.toolchains.tests.ToolchainsNameCheck(methodName='runTest')[source]

Bases: beat.web.toolchains.tests.ToolchainsAPIBase

setUp()[source]

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

test_no_check_for_anonymous_user()[source]
test_bad_request_for_post_method_without_needed_data()[source]
test_not_used_valid_name()[source]
test_not_used_invalid_name()[source]
test_used_valid_name()[source]
test_used_invalid_name()[source]
class beat.web.toolchains.tests.ToolchainCreation(methodName='runTest')[source]

Bases: beat.web.toolchains.tests.ToolchainsAPIBase

DECLARATION_INVALID = {'analyzers': [{'name': 'analysis', 'inputs': ['in'], 'synchronized_channel': 'dataset1'}], 'blocks': [{'name': 'block1', 'inputs': ['in'], 'outputs': ['out'], 'synchronized_channel': 'dataset1'}], 'connections': [{'from': 'dataset1.output1', 'to': 'block1.in', 'channel': 'dataset1'}, {'from': 'block2.out', 'to': 'analysis.in', 'channel': 'dataset1'}], 'datasets': [{'name': 'dataset1', 'outputs': ['output1']}], 'representation': {'blocks': {}, 'channel_colors': {}, 'connections': {}}}
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.

checkToolchainFile(filename, jsondata=None)[source]
test_no_creation_for_anonymous_user()[source]
test_no_creation_for_other_user()[source]
test_bad_request_for_post_method_without_needed_data()[source]
test_not_used_valid_name()[source]
test_not_used_invalid_name()[source]
test_used_valid_name()[source]
test_used_invalid_name()[source]
test_with_description()[source]
test_with_valid_declaration()[source]
test_with_invalid_declaration()[source]
test_no_forking_for_anonymous_user()[source]
test_no_forking_for_other_user()[source]
test_unsuccessful_forking_with_no_name()[source]
test_unsuccessful_forking_of_non_accredited_person_public_for_one_user_toolchain()[source]
test_unsuccessful_forking_of_personal_toolchain()[source]
test_successful_forking_from_public_for_all_toolchain()[source]
test_successful_forking_public_for_one_user()[source]
test_successful_forking_with_declaration()[source]
class beat.web.toolchains.tests.ToolchainUpdate(methodName='runTest')[source]

Bases: beat.web.toolchains.tests.ToolchainsAPIBase

DECLARATION_UPDATE = {'analyzers': [{'name': 'analysis', 'inputs': ['in'], 'synchronized_channel': 'dataset1'}], 'blocks': [{'name': 'block2', 'inputs': ['in'], 'outputs': ['out'], 'synchronized_channel': 'dataset1'}], 'connections': [{'from': 'dataset1.output1', 'to': 'block2.in', 'channel': 'dataset1'}, {'from': 'block2.out', 'to': 'analysis.in', 'channel': 'dataset1'}], 'datasets': [{'name': 'dataset1', 'outputs': ['output1']}], 'representation': {'blocks': {}, 'channel_colors': {}, 'connections': {}}}
DECLARATION_INVALID = {'analyzers': [{'name': 'analysis', 'inputs': ['in'], 'synchronized_channel': 'dataset1'}], 'blocks': [{'name': 'block1', 'inputs': ['in'], 'outputs': ['out'], 'synchronized_channel': 'dataset1'}], 'connections': [{'from': 'dataset1.output1', 'to': 'block1.in', 'channel': 'dataset1'}, {'from': 'block2.out', 'to': 'analysis.in', 'channel': 'dataset1'}], 'datasets': [{'name': 'dataset1', 'outputs': ['output1']}], 'representation': {'blocks': {}, 'channel_colors': {}, 'connections': {}}}
setUp()[source]

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

checkToolchainFileAndData(filename, data, jsondata=None)[source]
test_no_update_for_anonymous_user()[source]
test_no_update_for_other_user()[source]
test_fail_to_update_with_invalid_username()[source]
test_fail_to_update_with_invalid_toolchain_name()[source]
test_fail_to_update_with_invalid_version_number()[source]
test_fail_to_update_without_content_not_json_request()[source]
test_successful_update_without_content()[source]
test_successful_update_description_only()[source]
test_successful_update_declaration_only()[source]
test_fail_update_invalid_declaration_only()[source]
test_successful_update_invalid_declaration_description()[source]
test_fail_update_declaration_and_description()[source]
class beat.web.toolchains.tests.ToolchainRetrieval(methodName='runTest')[source]

Bases: beat.web.toolchains.tests.ToolchainsAPIBase

checkToolchainData(data)[source]
test_no_retrieval_of_confidential_toolchain_for_anonymous_user()[source]
test_fail_to_retrieve_with_invalid_username()[source]
test_fail_to_retrieve_with_invalid_toolchain_name()[source]
test_no_retrieval_of_confidential_toolchain()[source]
test_successful_retrieval_of_public_toolchain_for_anonymous_user()[source]
test_successful_retrieval_of_public_toolchain()[source]
test_successful_retrieval_of_public_for_one_user_toolchain()[source]
test_successful_retrieval_of_own_public_toolchain()[source]
test_successful_retrieval_of_own_private_toolchain()[source]
class beat.web.toolchains.tests.ToolchainDeletion(methodName='runTest')[source]

Bases: beat.web.toolchains.tests.ToolchainsAPIBase

setUp()[source]

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

test_no_deletion_for_anonymous_user()[source]
test_fail_to_delete_with_invalid_username()[source]
test_fail_to_delete_with_invalid_toolchain_name()[source]
test_fail_to_delete_with_invalid_version()[source]
test_no_deletion_of_not_owned_toolchain()[source]
test_successful_deletion_of_private_toolchain()[source]
class beat.web.toolchains.tests.ToolchainSharingAPIBase(methodName='runTest')[source]

Bases: beat.web.toolchains.tests.ToolchainsAPIBase

checkJSONSharingPreferences(sharing_preferences, reference)[source]
class beat.web.toolchains.tests.ToolchainSharingAPI_Failures(methodName='runTest')[source]

Bases: beat.web.toolchains.tests.ToolchainSharingAPIBase

setUp()[source]

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

test_fail_sharing_for_anonymous_user()[source]
test_fail_sharing_for_unauthorized_user()[source]
test_fail_sharing_to_public_for_unknown_user()[source]
class beat.web.toolchains.tests.NotSharedToolchain_SharingAPI(methodName='runTest')[source]

Bases: beat.web.toolchains.tests.ToolchainSharingAPIBase

setUp()[source]

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

test_sharing_as_public_for_all()[source]
test_sharing_as_public_for_one_user()[source]
test_sharing_as_public_for_multiple_users()[source]
class beat.web.toolchains.tests.PublicForOneUserToolchain_SharingAPI(methodName='runTest')[source]

Bases: beat.web.toolchains.tests.ToolchainSharingAPIBase

setUp()[source]

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

test_sharing_as_public_for_all()[source]
test_sharing_as_public_for_the_same_user()[source]
test_sharing_as_public_for_another_user()[source]
test_sharing_as_public_for_multiple_users()[source]
class beat.web.toolchains.tests.PublicForAllToolchain_SharingAPI(methodName='runTest')[source]

Bases: beat.web.toolchains.tests.ToolchainSharingAPIBase

setUp()[source]

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

test_sharing_as_public_for_all()[source]
test_sharing_as_public_for_one_user()[source]
test_sharing_as_public_for_multiple_users()[source]