当前位置: 首页>>代码示例>>Python>>正文


Python FixturesLoader.get_fixture_file_path_abs方法代码示例

本文整理汇总了Python中st2tests.fixturesloader.FixturesLoader.get_fixture_file_path_abs方法的典型用法代码示例。如果您正苦于以下问题:Python FixturesLoader.get_fixture_file_path_abs方法的具体用法?Python FixturesLoader.get_fixture_file_path_abs怎么用?Python FixturesLoader.get_fixture_file_path_abs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在st2tests.fixturesloader.FixturesLoader的用法示例。


在下文中一共展示了FixturesLoader.get_fixture_file_path_abs方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: FixturesLoader

# 需要导入模块: from st2tests.fixturesloader import FixturesLoader [as 别名]
# 或者: from st2tests.fixturesloader.FixturesLoader import get_fixture_file_path_abs [as 别名]
    ],
    'actions': [
        'a1.yaml',
        'a2.yaml',
        'action1.yaml'
    ],
    'runners': [
        'testrunner1.yaml',
        'testrunner2.yaml'
    ]
}

PACK = 'generic'
LOADER = FixturesLoader()
FIXTURES = LOADER.load_fixtures(fixtures_pack=PACK, fixtures_dict=TEST_FIXTURES)
WB_PRE_XFORM_PATH = LOADER.get_fixture_file_path_abs(PACK, 'workflows', WB_PRE_XFORM_FILE)
WB_INVALID_SYNTAX_PATH = LOADER.get_fixture_file_path_abs(PACK, 'workflows', WB_INVALID_SYNTAX_FILE)
WB_INVALID_YAQL_PATH = LOADER.get_fixture_file_path_abs(PACK, 'workflows', WB_INVALID_YAQL_FILE)
WF_PRE_XFORM_PATH = LOADER.get_fixture_file_path_abs(PACK, 'workflows', WF_PRE_XFORM_FILE)
WF_NO_REQ_PARAM_PATH = LOADER.get_fixture_file_path_abs(PACK, 'workflows', WF_NO_REQ_PARAM_FILE)
WF_UNEXP_PARAM_PATH = LOADER.get_fixture_file_path_abs(PACK, 'workflows', WF_UNEXP_PARAM_FILE)
WF_INVALID_SYNTAX_PATH = LOADER.get_fixture_file_path_abs(PACK, 'workflows', WF_INVALID_SYNTAX_FILE)
WF_INVALID_YAQL_PATH = LOADER.get_fixture_file_path_abs(PACK, 'workflows', WF_INVALID_YAQL_FILE)


class MistralValidationControllerTest(FunctionalTest):

    @classmethod
    def setUpClass(cls):
        super(MistralValidationControllerTest, cls).setUpClass()
开发者ID:AlexeyDeyneko,项目名称:st2,代码行数:32,代码来源:test_validator_mistral.py

示例2: FixturesLoader

# 需要导入模块: from st2tests.fixturesloader import FixturesLoader [as 别名]
# 或者: from st2tests.fixturesloader.FixturesLoader import get_fixture_file_path_abs [as 别名]
        'workflow_v2_many_workflows.yaml',
        'workbook_v2_name_mismatch.yaml',
        'workflow_v2_name_mismatch.yaml',
        'local.yaml'
    ]
}

PACK = 'generic'
LOADER = FixturesLoader()
FIXTURES = LOADER.load_fixtures(fixtures_pack=PACK, fixtures_dict=TEST_FIXTURES)

MISTRAL_EXECUTION = {'id': str(uuid.uuid4()), 'state': 'RUNNING', 'workflow_name': None}

# Workbook with a single workflow
WB1_YAML_FILE_NAME = TEST_FIXTURES['workflows'][0]
WB1_YAML_FILE_PATH = LOADER.get_fixture_file_path_abs(PACK, 'workflows', WB1_YAML_FILE_NAME)
WB1_SPEC = FIXTURES['workflows'][WB1_YAML_FILE_NAME]
WB1_YAML = yaml.safe_dump(WB1_SPEC, default_flow_style=False)
WB1_NAME = '%s.%s' % (PACK, WB1_YAML_FILE_NAME.replace('.yaml', ''))
WB1 = workbooks.Workbook(None, {'name': WB1_NAME, 'definition': WB1_YAML})
WB1_OLD = workbooks.Workbook(None, {'name': WB1_NAME, 'definition': ''})
WB1_EXEC = copy.deepcopy(MISTRAL_EXECUTION)
WB1_EXEC['workflow_name'] = WB1_NAME

# Workbook with many workflows
WB2_YAML_FILE_NAME = TEST_FIXTURES['workflows'][1]
WB2_YAML_FILE_PATH = LOADER.get_fixture_file_path_abs(PACK, 'workflows', WB2_YAML_FILE_NAME)
WB2_SPEC = FIXTURES['workflows'][WB2_YAML_FILE_NAME]
WB2_YAML = yaml.safe_dump(WB2_SPEC, default_flow_style=False)
WB2_NAME = '%s.%s' % (PACK, WB2_YAML_FILE_NAME.replace('.yaml', ''))
WB2 = workbooks.Workbook(None, {'name': WB2_NAME, 'definition': WB2_YAML})
开发者ID:emptywee,项目名称:st2,代码行数:33,代码来源:test_mistral_v2.py

示例3: FixturesLoader

# 需要导入模块: from st2tests.fixturesloader import FixturesLoader [as 别名]
# 或者: from st2tests.fixturesloader.FixturesLoader import get_fixture_file_path_abs [as 别名]
from st2common.transport.liveaction import LiveActionPublisher
from st2common.transport.publishers import CUDPublisher
from st2tests import DbTestCase
from st2tests.fixturesloader import FixturesLoader
from tests.unit.base import MockLiveActionPublisher


TEST_FIXTURES = {"workflows": ["workflow_v2.yaml"], "actions": ["workflow_v2.yaml", "local.yaml"]}

PACK = "generic"
LOADER = FixturesLoader()
FIXTURES = LOADER.load_fixtures(fixtures_pack=PACK, fixtures_dict=TEST_FIXTURES)

# Non-workbook with a single workflow
WF1_YAML_FILE_NAME = TEST_FIXTURES["workflows"][0]
WF1_YAML_FILE_PATH = LOADER.get_fixture_file_path_abs(PACK, "workflows", WF1_YAML_FILE_NAME)
WF1_SPEC = FIXTURES["workflows"][WF1_YAML_FILE_NAME]
WF1_YAML = yaml.safe_dump(WF1_SPEC, default_flow_style=False)
WF1_NAME = "%s.%s" % (PACK, WF1_YAML_FILE_NAME.replace(".yaml", ""))
WF1 = workflows.Workflow(None, {"name": WF1_NAME, "definition": WF1_YAML})
WF1_OLD = workflows.Workflow(None, {"name": WF1_NAME, "definition": ""})
WF1_EXEC = {"id": str(uuid.uuid4()), "state": "ERROR", "workflow_name": "mock"}
WF1_EXEC["workflow_name"] = WF1_NAME
WF1_EXEC_NOT_RERUNABLE = copy.deepcopy(WF1_EXEC)
WF1_EXEC_NOT_RERUNABLE["state"] = "PAUSED"

# Mistral task objects
TASK1 = {"id": str(uuid.uuid4()), "name": "say-greeting", "state": "SUCCESS"}
TASK2 = {"id": str(uuid.uuid4()), "name": "say-friend", "state": "SUCCESS"}

WF1_TASKS = [tasks.Task(None, copy.deepcopy(TASK1)), tasks.Task(None, copy.deepcopy(TASK2))]
开发者ID:enykeev,项目名称:st2,代码行数:33,代码来源:test_mistral_v2_rerun.py

示例4: FixturesLoader

# 需要导入模块: from st2tests.fixturesloader import FixturesLoader [as 别名]
# 或者: from st2tests.fixturesloader.FixturesLoader import get_fixture_file_path_abs [as 别名]
WF_PRE_XFORM_FILE = 'wf_pre_xform.yaml'
WF_POST_XFORM_FILE = 'wf_post_xform.yaml'
TEST_FIXTURES = {
    'workflows': [
        WB_PRE_XFORM_FILE,
        WB_POST_XFORM_FILE,
        WF_PRE_XFORM_FILE,
        WF_POST_XFORM_FILE
    ],
    'actions': ['local.yaml']
}

PACK = 'generic'
LOADER = FixturesLoader()
FIXTURES = LOADER.load_fixtures(fixtures_pack=PACK, fixtures_dict=TEST_FIXTURES)
WB_PRE_XFORM_PATH = LOADER.get_fixture_file_path_abs(PACK, 'workflows', WB_PRE_XFORM_FILE)
WB_PRE_XFORM_DEF = FIXTURES['workflows'][WB_PRE_XFORM_FILE]
WB_POST_XFORM_PATH = LOADER.get_fixture_file_path_abs(PACK, 'workflows', WB_POST_XFORM_FILE)
WB_POST_XFORM_DEF = FIXTURES['workflows'][WB_POST_XFORM_FILE]
WF_PRE_XFORM_PATH = LOADER.get_fixture_file_path_abs(PACK, 'workflows', WF_PRE_XFORM_FILE)
WF_PRE_XFORM_DEF = FIXTURES['workflows'][WF_PRE_XFORM_FILE]
WF_POST_XFORM_PATH = LOADER.get_fixture_file_path_abs(PACK, 'workflows', WF_POST_XFORM_FILE)
WF_POST_XFORM_DEF = FIXTURES['workflows'][WF_POST_XFORM_FILE]


def _read_file_content(path):
    with open(path, 'r') as f:
        return f.read()


class DSLTransformTestCase(DbTestCase):
开发者ID:Kailashkatheth1,项目名称:st2,代码行数:33,代码来源:test_mistral_dsl_transform.py

示例5: FixturesLoader

# 需要导入模块: from st2tests.fixturesloader import FixturesLoader [as 别名]
# 或者: from st2tests.fixturesloader.FixturesLoader import get_fixture_file_path_abs [as 别名]
        'local.yaml',
        'a1.yaml',
        'a2.yaml',
        'action1.yaml'
    ],
    'runners': [
        'run-local.yaml',
        'testrunner1.yaml',
        'testrunner2.yaml'
    ]
}

PACK = 'generic'
LOADER = FixturesLoader()
FIXTURES = LOADER.load_fixtures(fixtures_pack=PACK, fixtures_dict=TEST_FIXTURES)
WB_PRE_XFORM_PATH = LOADER.get_fixture_file_path_abs(PACK, 'workflows', WB_PRE_XFORM_FILE)
WB_PRE_XFORM_DEF = FIXTURES['workflows'][WB_PRE_XFORM_FILE]
WB_POST_XFORM_PATH = LOADER.get_fixture_file_path_abs(PACK, 'workflows', WB_POST_XFORM_FILE)
WB_POST_XFORM_DEF = FIXTURES['workflows'][WB_POST_XFORM_FILE]
WF_PRE_XFORM_PATH = LOADER.get_fixture_file_path_abs(PACK, 'workflows', WF_PRE_XFORM_FILE)
WF_PRE_XFORM_DEF = FIXTURES['workflows'][WF_PRE_XFORM_FILE]
WF_POST_XFORM_PATH = LOADER.get_fixture_file_path_abs(PACK, 'workflows', WF_POST_XFORM_FILE)
WF_POST_XFORM_DEF = FIXTURES['workflows'][WF_POST_XFORM_FILE]
WF_JINJA_ST2KV_PRE_XFORM_PATH = LOADER.get_fixture_file_path_abs(
    PACK, 'workflows', WF_JINJA_ST2KV_PRE_XFORM_FILE)
WF_JINJA_ST2KV_PRE_XFORM_DEF = FIXTURES['workflows'][WF_JINJA_ST2KV_PRE_XFORM_FILE]
WF_JINJA_ST2KV_POST_XFORM_PATH = LOADER.get_fixture_file_path_abs(
    PACK, 'workflows', WF_JINJA_ST2KV_POST_XFORM_FILE)
WF_JINJA_MIXED_CTX1_DEF = FIXTURES['workflows'][WF_JINJA_MIXED_CTX1_FILE]
WF_JINJA_MIXED_CTX1_PATH = LOADER.get_fixture_file_path_abs(
    PACK, 'workflows', WF_JINJA_MIXED_CTX1_FILE)
开发者ID:StackStorm,项目名称:st2,代码行数:33,代码来源:test_util_mistral_dsl_transform.py


注:本文中的st2tests.fixturesloader.FixturesLoader.get_fixture_file_path_abs方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。