def setUpClass(cls): cls.url = get_constant("MAGPIE_TEST_REMOTE_SERVER_URL") cls.json_headers = utils.get_headers(cls.url, {"Accept": CONTENT_TYPE_JSON, "Content-Type": CONTENT_TYPE_JSON}) cls.cookies = None cls.usr = get_constant("MAGPIE_ANONYMOUS_USER") cls.grp = get_constant("MAGPIE_ANONYMOUS_GROUP") cls.version = utils.TestSetup.get_Version(cls)
def setUpClass(cls): cls.app = utils.get_test_magpie_app() cls.url = cls.app # to simplify calls of TestSetup (all use .url) cls.grp = get_constant("MAGPIE_ADMIN_GROUP") cls.usr = get_constant("MAGPIE_TEST_ADMIN_USERNAME") cls.pwd = get_constant("MAGPIE_TEST_ADMIN_PASSWORD") cls.json_headers = utils.get_headers(cls.url, { "Accept": CONTENT_TYPE_JSON, "Content-Type": CONTENT_TYPE_JSON }) cls.cookies = None cls.version = utils.TestSetup.get_Version(cls) # TODO: fix UI views so that they can be "found" directly in the WebTest.TestApp # NOTE: localhost magpie has to be running for following login call to work cls.headers, cls.cookies = utils.check_or_try_login_user( cls.app, cls.usr, cls.pwd, use_ui_form_submit=True, version=cls.version) cls.require = "cannot run tests without logged in user with '{}' permissions".format( cls.grp) cls.test_perm_svc_name = "test-service-perms-config" cls.test_perm_grp_name = "test-group-perms-config"
def setUpClass(cls): cls.grp = get_constant("MAGPIE_ADMIN_GROUP") cls.usr = get_constant("MAGPIE_TEST_ADMIN_USERNAME") cls.pwd = get_constant("MAGPIE_TEST_ADMIN_PASSWORD") cls.app = utils.get_test_magpie_app() cls.url = cls.app # to simplify calls of TestSetup (all use .url) cls.json_headers = utils.get_headers(cls.app, { "Accept": CONTENT_TYPE_JSON, "Content-Type": CONTENT_TYPE_JSON }) cls.cookies = None cls.version = utils.TestSetup.get_Version(cls) cls.headers, cls.cookies = utils.check_or_try_login_user( cls.url, cls.usr, cls.pwd, use_ui_form_submit=True) cls.require = "cannot run tests without logged in user with '{}' permissions".format( cls.grp) cls.check_requirements() cls.test_user = get_constant("MAGPIE_ANONYMOUS_USER") cls.test_group = get_constant("MAGPIE_ANONYMOUS_GROUP") cls.test_service_type = utils.get_service_types_for_version( cls.version)[0] cls.test_service_name = utils.TestSetup.get_AnyServiceOfTestServiceType( cls)["service_name"] cls.test_service_parent_resource_type = ServiceAPI.service_type cls.test_service_parent_resource_name = "magpie-unittest-ui-tree-parent" cls.test_service_child_resource_type = Route.resource_type_name cls.test_service_child_resource_name = "magpie-unittest-ui-tree-child"
def setUpClass(cls): cls.app = utils.get_test_magpie_app() cls.json_headers = utils.get_headers(cls.app, {"Accept": CONTENT_TYPE_JSON, "Content-Type": CONTENT_TYPE_JSON}) cls.cookies = None cls.version = utils.TestSetup.get_Version(cls) cls.usr = get_constant("MAGPIE_ANONYMOUS_USER") cls.grp = get_constant("MAGPIE_ANONYMOUS_GROUP")
def setUpClass(cls): cls.grp = get_constant("MAGPIE_ADMIN_GROUP") cls.usr = get_constant("MAGPIE_TEST_ADMIN_USERNAME") cls.pwd = get_constant("MAGPIE_TEST_ADMIN_PASSWORD") cls.url = get_constant("MAGPIE_TEST_REMOTE_SERVER_URL") cls.headers, cls.cookies = utils.check_or_try_login_user(cls.url, cls.usr, cls.pwd) cls.require = "cannot run tests without logged in user with '{}' permissions".format(cls.grp) cls.json_headers = utils.get_headers(cls.url, {"Accept": CONTENT_TYPE_JSON, "Content-Type": CONTENT_TYPE_JSON}) cls.version = utils.TestSetup.get_Version(cls) cls.check_requirements() cls.setup_test_values()
def setUpClass(cls): cls.app = utils.get_test_magpie_app() cls.url = cls.app # to simplify calls of TestSetup (all use .url) cls.json_headers = utils.get_headers(cls.app, { "Accept": CONTENT_TYPE_JSON, "Content-Type": CONTENT_TYPE_JSON }) cls.cookies = None cls.test_user = get_constant("MAGPIE_ANONYMOUS_USER") cls.test_group = get_constant("MAGPIE_ANONYMOUS_GROUP") cls.test_service_type = ServiceWPS.service_type cls.test_service_name = "flyingpigeon"
def setUpClass(cls): cls.url = get_constant("MAGPIE_TEST_REMOTE_SERVER_URL") cls.json_headers = utils.get_headers(cls.url, { "Accept": CONTENT_TYPE_JSON, "Content-Type": CONTENT_TYPE_JSON }) cls.cookies = None cls.usr = get_constant("MAGPIE_ANONYMOUS_USER") cls.version = utils.TestSetup.get_Version(cls) cls.test_user = get_constant("MAGPIE_ANONYMOUS_USER") cls.test_group = get_constant("MAGPIE_ANONYMOUS_GROUP") cls.test_service_type = ServiceWPS.service_type cls.test_service_name = "flyingpigeon"
def setUpClass(cls): cls.app = utils.get_test_magpie_app() cls.url = cls.app # to simplify calls of TestSetup (all use .url) cls.grp = get_constant("MAGPIE_ADMIN_GROUP") cls.usr = get_constant("MAGPIE_TEST_ADMIN_USERNAME") cls.pwd = get_constant("MAGPIE_TEST_ADMIN_PASSWORD") cls.json_headers = utils.get_headers(cls.url, { "Accept": CONTENT_TYPE_JSON, "Content-Type": CONTENT_TYPE_JSON }) cls.cookies = None cls.version = utils.TestSetup.get_Version(cls) cls.require = "cannot run tests without logged in user with '{}' permissions".format( cls.grp) cls.setup_admin() cls.test_perm_svc_name = "test-service-perms-config" cls.test_perm_grp_name = "test-group-perms-config"
def setUpClass(cls): cls.usr = get_constant("MAGPIE_TEST_ADMIN_USERNAME") cls.pwd = get_constant("MAGPIE_TEST_ADMIN_PASSWORD") cls.url = get_constant("MAGPIE_TEST_REMOTE_SERVER_URL") cls.headers, cls.cookies = utils.check_or_try_login_user( cls.url, cls.usr, cls.pwd) cls.require = "cannot run tests without logged in '{}' user".format( get_constant("MAGPIE_ADMIN_GROUP")) cls.json_headers = utils.get_headers(cls.url, { "Accept": CONTENT_TYPE_JSON, "Content-Type": CONTENT_TYPE_JSON }) cls.check_requirements() cls.version = utils.TestSetup.get_Version(cls) cls.test_user = get_constant("MAGPIE_ANONYMOUS_USER") cls.test_group = get_constant("MAGPIE_ANONYMOUS_GROUP") cls.test_service_type = utils.get_service_types_for_version( cls.version)[0] cls.test_service_name = utils.TestSetup.get_AnyServiceOfTestServiceType( cls)["service_name"]