本文整理汇总了Python中awslimitchecker.limit.AwsLimit.set_limit_override方法的典型用法代码示例。如果您正苦于以下问题:Python AwsLimit.set_limit_override方法的具体用法?Python AwsLimit.set_limit_override怎么用?Python AwsLimit.set_limit_override使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类awslimitchecker.limit.AwsLimit
的用法示例。
在下文中一共展示了AwsLimit.set_limit_override方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_set_limit_override_ta_False
# 需要导入模块: from awslimitchecker.limit import AwsLimit [as 别名]
# 或者: from awslimitchecker.limit.AwsLimit import set_limit_override [as 别名]
def test_set_limit_override_ta_False(self):
limit = AwsLimit(
'limitname',
self.mock_svc,
3,
1,
2
)
limit.set_limit_override(1, override_ta=False)
assert limit.limit_override == 1
assert limit.default_limit == 3
assert limit.override_ta is False
示例2: test_set_limit_override
# 需要导入模块: from awslimitchecker.limit import AwsLimit [as 别名]
# 或者: from awslimitchecker.limit.AwsLimit import set_limit_override [as 别名]
def test_set_limit_override(self):
limit = AwsLimit(
'limitname',
self.mock_svc,
3,
1,
2
)
limit.set_limit_override(10)
assert limit.limit_override == 10
assert limit.default_limit == 3
assert limit.override_ta is True
示例3: test_get_limit_source_api_override_ta
# 需要导入模块: from awslimitchecker.limit import AwsLimit [as 别名]
# 或者: from awslimitchecker.limit.AwsLimit import set_limit_override [as 别名]
def test_get_limit_source_api_override_ta(self):
limit = AwsLimit('limitname', self.mock_svc, 3, 1, 2)
limit._set_api_limit(40)
limit._set_ta_limit(41)
limit.set_limit_override(55)
assert limit.get_limit_source() == SOURCE_OVERRIDE
示例4: test_get_limit_source_override_no_override_ta
# 需要导入模块: from awslimitchecker.limit import AwsLimit [as 别名]
# 或者: from awslimitchecker.limit.AwsLimit import set_limit_override [as 别名]
def test_get_limit_source_override_no_override_ta(self):
limit = AwsLimit('limitname', self.mock_svc, 3, 1, 2)
limit.set_limit_override(55, override_ta=False)
limit._set_ta_limit(40)
assert limit.get_limit_source() == SOURCE_TA
示例5: test_get_limit_api_override_ta
# 需要导入模块: from awslimitchecker.limit import AwsLimit [as 别名]
# 或者: from awslimitchecker.limit.AwsLimit import set_limit_override [as 别名]
def test_get_limit_api_override_ta(self):
limit = AwsLimit('limitname', self.mock_svc, 3, 1, 2)
limit.set_limit_override(55)
limit._set_ta_limit(40)
limit._set_api_limit(11)
assert limit.get_limit() == 55
示例6: test_get_limit_ta_unlimited
# 需要导入模块: from awslimitchecker.limit import AwsLimit [as 别名]
# 或者: from awslimitchecker.limit.AwsLimit import set_limit_override [as 别名]
def test_get_limit_ta_unlimited(self):
limit = AwsLimit('limitname', self.mock_svc, 3, 1, 2)
limit.set_limit_override(55, override_ta=False)
limit._set_ta_unlimited()
assert limit.get_limit() is None
示例7: test_get_limit_override
# 需要导入模块: from awslimitchecker.limit import AwsLimit [as 别名]
# 或者: from awslimitchecker.limit.AwsLimit import set_limit_override [as 别名]
def test_get_limit_override(self):
limit = AwsLimit('limitname', self.mock_svc, 3, 1, 2)
limit.set_limit_override(55)
assert limit.get_limit() == 55
示例8: test_get_limit_source_override_with_ta
# 需要导入模块: from awslimitchecker.limit import AwsLimit [as 别名]
# 或者: from awslimitchecker.limit.AwsLimit import set_limit_override [as 别名]
def test_get_limit_source_override_with_ta(self):
limit = AwsLimit('limitname', self.mock_svc, 3, 1, 2)
limit.set_limit_override(55)
limit._set_ta_limit(40)
assert limit.get_limit_source() == 1