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


Python CLITest.check_curl方法代码示例

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


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

示例1: test_create_curl

# 需要导入模块: from cli_test import CLITest [as 别名]
# 或者: from cli_test.CLITest import check_curl [as 别名]
    def test_create_curl(self):
        runner = CLIRunner(self.cli)

        metric = 'FOO'
        curl = runner.get_output(['-n', metric,
                                  '-z'])
        CLITest.check_curl(self, self.cli, curl)
开发者ID:boundary,项目名称:pulse-api-cli,代码行数:9,代码来源:metric_delete_test.py

示例2: test_create_curl

# 需要导入模块: from cli_test import CLITest [as 别名]
# 或者: from cli_test.CLITest import check_curl [as 别名]
    def test_create_curl(self):
        runner = CLIRunner(self.cli)

        alarm_id = 1024

        curl = runner.get_output(['-i', str(alarm_id),
                                  '-z'])
        CLITest.check_curl(self, self.cli, curl)
开发者ID:boundary,项目名称:pulse-api-cli,代码行数:10,代码来源:alarm_delete_test.py

示例3: test_create_curl

# 需要导入模块: from cli_test import CLITest [as 别名]
# 或者: from cli_test.CLITest import check_curl [as 别名]
    def test_create_curl(self):
        runner = CLIRunner(self.cli)

        filter_name = 'My-Filter'

        curl = runner.get_output(['-n', filter_name,
                                  '-z'])
        CLITest.check_curl(self, self.cli, curl)
开发者ID:boundary,项目名称:pulse-api-cli,代码行数:10,代码来源:hostgroup_search_test.py

示例4: test_create_curl

# 需要导入模块: from cli_test import CLITest [as 别名]
# 或者: from cli_test.CLITest import check_curl [as 别名]
    def test_create_curl(self):
        runner = CLIRunner(self.cli)

        enabled = True
        custom = True

        curl = runner.get_output(['-b', str(enabled).lower(),
                                  '-c', str(custom).lower(),
                                  '-z'])
        CLITest.check_curl(self, self.cli, curl)
开发者ID:boundary,项目名称:pulse-api-cli,代码行数:12,代码来源:metric_list_test.py

示例5: test_create_curl

# 需要导入模块: from cli_test import CLITest [as 别名]
# 或者: from cli_test.CLITest import check_curl [as 别名]
    def test_create_curl(self):
        runner = CLIRunner(self.cli)

        metric = 'CPU'
        measurement = 0.5
        timestamp = 1452643455

        curl = runner.get_output(['-n', metric,
                                  '-m', str(measurement),
                                  '-s', 'source1',
                                  '-d', str(timestamp),
                                  '-z'])
        CLITest.check_curl(self, self.cli, curl)
开发者ID:boundary,项目名称:pulse-api-cli,代码行数:15,代码来源:measurement_create_test.py

示例6: test_create_curl

# 需要导入模块: from cli_test import CLITest [as 别名]
# 或者: from cli_test.CLITest import check_curl [as 别名]
    def test_create_curl(self):
        runner = CLIRunner(self.cli)

        alarm_id = 1024
        alarm_name = 'my-curl'
        metric_name = 'CPU'
        aggregate = 'min'
        operation = 'lt'
        value = 0.5
        trigger_interval = 300000
        enabled = False

        curl = runner.get_output(['-i', str(alarm_id),
                                  '-n', alarm_name,
                                  '-m', metric_name,
                                  '-g', aggregate,
                                  '-o', operation,
                                  '-v', str(value),
                                  '-r', str(trigger_interval),
                                  '-x', str(enabled).lower(),
                                  '-z'])
        CLITest.check_curl(self, self.cli, curl)
开发者ID:boundary,项目名称:pulse-api-cli,代码行数:24,代码来源:alarm_update_test.py

示例7: test_create_curl

# 需要导入模块: from cli_test import CLITest [as 别名]
# 或者: from cli_test.CLITest import check_curl [as 别名]
    def test_create_curl(self):
        runner = CLIRunner(self.cli)

        runner_create = CLIRunner(MetricCreate())
        metric_name = 'METRIC'
        display_name = 'Display Name'
        display_name_short = 'Short Display Name'
        description = 'My Description'
        aggregate = 'avg'
        unit = 'number'
        resolution = 60000
        disabled = False

        curl = runner_create.get_output(['-n', metric_name,
                                         '-d', display_name,
                                         '-s', display_name_short,
                                         '-i', description,
                                         '-g', aggregate,
                                         '-r', str(resolution),
                                         '-u', unit,
                                         '-x', str(disabled).lower(),
                                         '-z'])
        CLITest.check_curl(self, self.cli, curl)
开发者ID:boundary,项目名称:pulse-api-cli,代码行数:25,代码来源:metric_create_test.py

示例8: test_create_curl

# 需要导入模块: from cli_test import CLITest [as 别名]
# 或者: from cli_test.CLITest import check_curl [as 别名]
    def test_create_curl(self):
        runner = CLIRunner(self.cli)

        curl = runner.get_output(['-z'])
        CLITest.check_curl(self, self.cli, curl)
开发者ID:boundary,项目名称:pulse-api-cli,代码行数:7,代码来源:alarm_list_test.py


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