@mock_autoscaling
def test_execute_policy_small_percent_change_in_capacity():
 setup_autoscale_group()
 conn = boto.connect_autoscale()
 policy = ScalingPolicy(name=u'ScaleUp', adjustment_type=u'PercentChangeInCapacity', as_name=u'tester_group', scaling_adjustment=1)
 conn.create_scaling_policy(policy)
 conn.execute_policy(u'ScaleUp')
 instances = list(conn.get_all_autoscaling_instances())
 instances.should.have.length_of(3)

@ mock_autoscaling def test_execute_policy_small_percent_change_in_capacity ( ) : setup_autoscale_group ( ) conn = boto . connect_autoscale ( ) policy = ScalingPolicy ( name = u'ScaleUp' , adjustment_type = u'PercentChangeInCapacity' , as_name = u'tester_group' , scaling_adjustment = 1 ) conn . create_scaling_policy ( policy ) conn . execute_policy ( u'ScaleUp' ) instances = list ( conn . get_all_autoscaling_instances ( ) ) instances . should . have . length_of ( 3 )
URL if percentchangeincapacity returns a value between 0 and 1 .