本文整理汇总了Python中trove.tests.api.instances.assert_unprocessable函数的典型用法代码示例。如果您正苦于以下问题:Python assert_unprocessable函数的具体用法?Python assert_unprocessable怎么用?Python assert_unprocessable使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了assert_unprocessable函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: test_configurations_create_value_out_of_bounds
def test_configurations_create_value_out_of_bounds(self):
"""Test create configuration with value out of bounds."""
expected_configs = self.expected_default_datastore_configs()
values = json.dumps(expected_configs.get("out_of_bounds_over"))
assert_unprocessable(instance_info.dbaas.configurations.create, CONFIG_NAME, values, CONFIG_DESC)
values = json.dumps(expected_configs.get("out_of_bounds_under"))
assert_unprocessable(instance_info.dbaas.configurations.create, CONFIG_NAME, values, CONFIG_DESC)
开发者ID:rumale,项目名称:trove,代码行数:7,代码来源:configurations.py
示例2: test_configurations_create_value_out_of_bounds
def test_configurations_create_value_out_of_bounds(self):
"""test create configuration with value out of bounds"""
values = '{"connect_timeout": 1000000}'
assert_unprocessable(instance_info.dbaas.configurations.create,
CONFIG_NAME, values, CONFIG_DESC)
values = '{"connect_timeout": -10}'
assert_unprocessable(instance_info.dbaas.configurations.create,
CONFIG_NAME, values, CONFIG_DESC)
开发者ID:NeCTAR-RC,项目名称:trove,代码行数:8,代码来源:configurations.py
示例3: test_instance_action_right_after_backup_create
def test_instance_action_right_after_backup_create(self):
"""test any instance action while backup is running"""
backup = self._create_backup("modify_during_create",
"modify instance while creating backup")
assert_equal(202, instance_info.dbaas.last_http_code)
# Dont wait for backup to complete, try to delete it
assert_unprocessable(instance_info.dbaas.instances.resize_instance,
instance_info.id, 1)
poll_until(lambda: self._verify_backup_status(backup.id, 'COMPLETED'),
time_out=120, sleep_time=2)
开发者ID:plodronio,项目名称:trove,代码行数:10,代码来源:backups.py
示例4: test_status_changed_to_resize
def test_status_changed_to_resize(self):
self.log_current_users()
self.obtain_flavor_ids()
self.dbaas.instances.resize_instance(
self.instance_id,
self.get_flavor_href(flavor_id=self.expected_new_flavor_id))
assert_equal(202, self.dbaas.last_http_code)
#(WARNING) IF THE RESIZE IS WAY TOO FAST THIS WILL FAIL
assert_unprocessable(
self.dbaas.instances.resize_instance,
self.instance_id,
self.get_flavor_href(flavor_id=self.expected_new_flavor_id))
开发者ID:VinodKrGupta,项目名称:trove,代码行数:13,代码来源:instances_actions.py
示例5: test_configurations_create_invalid_value_type
def test_configurations_create_invalid_value_type(self):
"""Test create configuration with invalild value type."""
values = '{"key_buffer_size": "this is a string not int"}'
assert_unprocessable(instance_info.dbaas.configurations.create,
CONFIG_NAME, values, CONFIG_DESC)
开发者ID:tangguochang,项目名称:trove,代码行数:5,代码来源:configurations.py
示例6: test_backup_delete_still_running
def test_backup_delete_still_running(self):
"""test delete backup when it is running"""
result = instance_info.dbaas.backups.list()
backup = result[0]
assert_unprocessable(instance_info.dbaas.backups.delete, backup.id)
开发者ID:dfecker,项目名称:trove,代码行数:5,代码来源:backups.py
示例7: test_backup_create_another_backup_running
def test_backup_create_another_backup_running(self):
"""test create backup when another backup is running"""
assert_unprocessable(instance_info.dbaas.backups.create,
'backup_test2', instance_info.id,
'test description2')
开发者ID:dfecker,项目名称:trove,代码行数:5,代码来源:backups.py
示例8: test_instance_action_right_after_backup_create
def test_instance_action_right_after_backup_create(self):
"""test any instance action while backup is running"""
assert_unprocessable(instance_info.dbaas.instances.resize_instance,
instance_info.id, 1)
开发者ID:dfecker,项目名称:trove,代码行数:4,代码来源:backups.py
示例9: test_configurations_create_invalid_values
def test_configurations_create_invalid_values(self):
"""Test create configurations with invalid values."""
values = '{"this_is_invalid": 123}'
assert_unprocessable(instance_info.dbaas.configurations.create,
CONFIG_NAME, values, CONFIG_DESC)
开发者ID:igor-feoktistov,项目名称:trove,代码行数:5,代码来源:configurations.py
注:本文中的trove.tests.api.instances.assert_unprocessable函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论