Back to Black
This commit is contained in:
parent
ea489bce6c
commit
5697ff87a8
112 changed files with 1803 additions and 977 deletions
|
|
@ -97,8 +97,8 @@ def test_create_autoscaling_group():
|
|||
|
||||
@mock_autoscaling_deprecated
|
||||
def test_create_autoscaling_groups_defaults():
|
||||
""" Test with the minimum inputs and check that all of the proper defaults
|
||||
are assigned for the other attributes """
|
||||
"""Test with the minimum inputs and check that all of the proper defaults
|
||||
are assigned for the other attributes"""
|
||||
|
||||
mocked_networking = setup_networking_deprecated()
|
||||
conn = boto.connect_autoscale()
|
||||
|
|
@ -961,7 +961,8 @@ def test_describe_autoscaling_groups_boto3_launch_config():
|
|||
mocked_networking = setup_networking()
|
||||
client = boto3.client("autoscaling", region_name="us-east-1")
|
||||
client.create_launch_configuration(
|
||||
LaunchConfigurationName="test_launch_configuration", InstanceType="t2.micro",
|
||||
LaunchConfigurationName="test_launch_configuration",
|
||||
InstanceType="t2.micro",
|
||||
)
|
||||
client.create_auto_scaling_group(
|
||||
AutoScalingGroupName="test_asg",
|
||||
|
|
@ -1040,7 +1041,8 @@ def test_describe_autoscaling_instances_boto3_launch_config():
|
|||
mocked_networking = setup_networking()
|
||||
client = boto3.client("autoscaling", region_name="us-east-1")
|
||||
client.create_launch_configuration(
|
||||
LaunchConfigurationName="test_launch_configuration", InstanceType="t2.micro",
|
||||
LaunchConfigurationName="test_launch_configuration",
|
||||
InstanceType="t2.micro",
|
||||
)
|
||||
client.create_auto_scaling_group(
|
||||
AutoScalingGroupName="test_asg",
|
||||
|
|
@ -2154,7 +2156,8 @@ def test_standby_exit_standby():
|
|||
response["AutoScalingInstances"][0]["LifecycleState"].should.equal("Standby")
|
||||
|
||||
response = client.exit_standby(
|
||||
AutoScalingGroupName="test_asg", InstanceIds=[instance_to_standby_exit_standby],
|
||||
AutoScalingGroupName="test_asg",
|
||||
InstanceIds=[instance_to_standby_exit_standby],
|
||||
)
|
||||
response["ResponseMetadata"]["HTTPStatusCode"].should.equal(200)
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,8 @@ Outputs:
|
|||
""".strip()
|
||||
|
||||
cf_client.create_stack(
|
||||
StackName=stack_name, TemplateBody=cf_template,
|
||||
StackName=stack_name,
|
||||
TemplateBody=cf_template,
|
||||
)
|
||||
stack = cf_client.describe_stacks(StackName=stack_name)["Stacks"][0]
|
||||
stack["Outputs"][0]["OutputValue"].should.be.equal("test_launch_configuration")
|
||||
|
|
@ -56,7 +57,8 @@ Outputs:
|
|||
""".strip()
|
||||
|
||||
cf_client.update_stack(
|
||||
StackName=stack_name, TemplateBody=cf_template,
|
||||
StackName=stack_name,
|
||||
TemplateBody=cf_template,
|
||||
)
|
||||
stack = cf_client.describe_stacks(StackName=stack_name)["Stacks"][0]
|
||||
stack["Outputs"][0]["OutputValue"].should.be.equal("test_launch_configuration")
|
||||
|
|
@ -76,7 +78,8 @@ def test_autoscaling_group_from_launch_config():
|
|||
client = boto3.client("autoscaling", region_name="us-east-1")
|
||||
|
||||
client.create_launch_configuration(
|
||||
LaunchConfigurationName="test_launch_configuration", InstanceType="t2.micro",
|
||||
LaunchConfigurationName="test_launch_configuration",
|
||||
InstanceType="t2.micro",
|
||||
)
|
||||
stack_name = "test-auto-scaling-group"
|
||||
|
||||
|
|
|
|||
|
|
@ -152,8 +152,8 @@ def test_create_launch_configuration_using_ip_association_should_default_to_fals
|
|||
|
||||
@mock_autoscaling_deprecated
|
||||
def test_create_launch_configuration_defaults():
|
||||
""" Test with the minimum inputs and check that all of the proper defaults
|
||||
are assigned for the other attributes """
|
||||
"""Test with the minimum inputs and check that all of the proper defaults
|
||||
are assigned for the other attributes"""
|
||||
conn = boto.connect_autoscale()
|
||||
config = LaunchConfiguration(
|
||||
name="tester", image_id="ami-abcd1234", instance_type="m1.small"
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ def test_execute_policy_percent_change_in_capacity():
|
|||
|
||||
@mock_autoscaling_deprecated
|
||||
def test_execute_policy_small_percent_change_in_capacity():
|
||||
""" http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/as-scale-based-on-demand.html
|
||||
"""http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/as-scale-based-on-demand.html
|
||||
If PercentChangeInCapacity returns a value between 0 and 1,
|
||||
Auto Scaling will round it off to 1."""
|
||||
setup_autoscale_group()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue