本文整理汇总了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)
示例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)
示例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)
示例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)
示例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)
示例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)
示例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)
示例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)