tests.rest.template_version_manager.tests_int

Integration Test for Template Version Manager Rest API

class tests.rest.template_version_manager.tests_int.TestCurrentTemplateVersion(methodName='runTest')

Bases: core_main_app.utils.integration_tests.integration_base_test_case.MongoIntegrationBaseTestCase

fixture = <tests.components.template_version_manager.fixtures.fixtures.TemplateVersionManagerFixtures object>
test_patch_disabled_returns_http_400()
test_patch_global_as_user_returns_http_403()
test_patch_other_user_returns_http_403()
test_patch_returns_http_200()
test_patch_wrong_id_returns_http_404()
class tests.rest.template_version_manager.tests_int.TestDisableTemplateVersion(methodName='runTest')

Bases: core_main_app.utils.integration_tests.integration_base_test_case.MongoIntegrationBaseTestCase

fixture = <tests.components.template_version_manager.fixtures.fixtures.TemplateVersionManagerFixtures object>
test_patch_already_disabled_returns_http_200()
test_patch_current_returns_http_400()
test_patch_global_as_user_returns_http_403()
test_patch_other_user_returns_http_403()
test_patch_returns_http_200()
test_patch_wrong_id_returns_http_404()
class tests.rest.template_version_manager.tests_int.TestDisableTemplateVersionManager(methodName='runTest')

Bases: core_main_app.utils.integration_tests.integration_base_test_case.MongoIntegrationBaseTestCase

fixture = <tests.components.template_version_manager.fixtures.fixtures.TemplateVersionManagerFixtures object>
test_patch_already_disabled_returns_http_200()
test_patch_global_as_user_returns_http_403()
test_patch_other_user_returns_http_403()
test_patch_returns_http_200()
test_patch_wrong_id_returns_http_404()
class tests.rest.template_version_manager.tests_int.TestGlobalTemplateList(methodName='runTest')

Bases: core_main_app.utils.integration_tests.integration_base_test_case.MongoIntegrationBaseTestCase

fixture = <tests.components.template_version_manager.fixtures.fixtures.TemplateVersionManagerFixtures object>
setUp()

Insert needed data.

Returns:

test_post_owner_is_global(**kwargs)
test_post_returns_http_201_if_user_is_staff(**kwargs)
test_post_returns_http_403_if_user_does_not_have_permission(**kwargs)
test_post_returns_http_403_if_user_is_superuser(**kwargs)
class tests.rest.template_version_manager.tests_int.TestGlobalTemplateVersionManagerList(methodName='runTest')

Bases: core_main_app.utils.integration_tests.integration_base_test_case.MongoIntegrationBaseTestCase

fixture = <tests.components.template_version_manager.fixtures.fixtures.TemplateVersionManagerFixtures object>
setUp()

Insert needed data.

Returns:

test_get_filtered_by_correct_title_returns_tvm()
test_get_filtered_by_expected_is_disabled_returns_tvm()
test_get_filtered_by_incorrect_is_disabled_returns_no_tvm()
test_get_filtered_by_incorrect_title_returns_no_tvm()
test_get_returned_tvm_are_global()
test_get_returns_all_global_tvm()
test_get_returns_http_200()
class tests.rest.template_version_manager.tests_int.TestRestoreTemplateVersion(methodName='runTest')

Bases: core_main_app.utils.integration_tests.integration_base_test_case.MongoIntegrationBaseTestCase

fixture = <tests.components.template_version_manager.fixtures.fixtures.TemplateVersionManagerFixtures object>
test_patch_global_as_user_returns_http_403()
test_patch_not_disabled_returns_http_400()
test_patch_other_user_returns_http_403()
test_patch_returns_http_200()
test_patch_wrong_id_returns_http_404()
class tests.rest.template_version_manager.tests_int.TestRestoreTemplateVersionManager(methodName='runTest')

Bases: core_main_app.utils.integration_tests.integration_base_test_case.MongoIntegrationBaseTestCase

fixture = <tests.components.template_version_manager.fixtures.fixtures.TemplateVersionManagerFixtures object>
test_patch_global_as_user_returns_http_403()
test_patch_not_disabled_returns_http_200()
test_patch_other_user_returns_http_403()
test_patch_returns_http_200()
test_patch_wrong_id_returns_http_404()
class tests.rest.template_version_manager.tests_int.TestTemplateVersion(methodName='runTest')

Bases: core_main_app.utils.integration_tests.integration_base_test_case.MongoIntegrationBaseTestCase

fixture = <tests.components.template_version_manager.fixtures.fixtures.TemplateVersionManagerFixtures object>
post_returns_http_201()
post_to_global_as_superuser_returns_http_201()
post_to_global_as_user_returns_http_403()
post_to_other_user_as_superuser_returns_http_201()
post_to_other_user_returns_http_403()
post_wrong_id_returns_http_404()
setUp()

Insert needed data.

Returns:

class tests.rest.template_version_manager.tests_int.TestTemplateVersionManagerDetail(methodName='runTest')

Bases: core_main_app.utils.integration_tests.integration_base_test_case.MongoIntegrationBaseTestCase

fixture = <tests.components.template_version_manager.fixtures.fixtures.TemplateVersionManagerFixtures object>
setUp()

Insert needed data.

Returns:

test_get_returns_http_200()
test_get_returns_tvm()
test_get_wrong_id_returns_http_404()
class tests.rest.template_version_manager.tests_int.TestUserTemplateList(methodName='runTest')

Bases: core_main_app.utils.integration_tests.integration_base_test_case.MongoIntegrationBaseTestCase

fixture = <tests.components.template_version_manager.fixtures.fixtures.TemplateVersionManagerFixtures object>
setUp()

Insert needed data.

Returns:

test_post_owner_is_user(**kwargs)
test_post_returns_http_201(**kwargs)
test_post_template_name_already_exists_returns_http_400()
test_post_template_with_correct_dependency_returns_http_201(**kwargs)
test_post_template_with_incorrect_dependency_id_returns_http_400(**kwargs)
test_post_template_with_incorrect_dependency_schemaLocation_returns_http_400(**kwargs)
class tests.rest.template_version_manager.tests_int.TestUserTemplateVersionManagerList(methodName='runTest')

Bases: core_main_app.utils.integration_tests.integration_base_test_case.MongoIntegrationBaseTestCase

fixture = <tests.components.template_version_manager.fixtures.fixtures.TemplateVersionManagerFixtures object>
setUp()

Insert needed data.

Returns:

test_get_filtered_by_correct_title_returns_tvm()
test_get_filtered_by_expected_is_disabled_returns_tvm()
test_get_filtered_by_incorrect_is_disabled_returns_no_tvm()
test_get_filtered_by_incorrect_title_returns_no_tvm()
test_get_returned_tvm_are_from_user()
test_get_returns_all_user_tvm()
test_get_returns_http_200()