def test_AutoscalingPolicy_status(self): test_instance = policy.AutoscalingPolicy("ctx_node", resource_id='policy_id', client=self.fake_client, logger=None) self.assertEqual(test_instance.status, None)
def test_AutoscalingPolicy_status_NotEmpty(self): self.fake_client.describe_policies = MagicMock( return_value={'ScalingPolicies': ['policy']}) test_instance = policy.AutoscalingPolicy("ctx_node", resource_id='policy_id', client=self.fake_client, logger=None) self.assertEqual(test_instance.status, None)
def test_AutoscalingPolicy_properties_not_empty(self): test_instance = policy.AutoscalingPolicy("ctx_node", resource_id='policy_id', client=self.fake_client, logger=None) self.fake_client.describe_policies = MagicMock( return_value={'ScalingPolicies': ['policy']}) self.assertEqual(test_instance.properties, 'policy') self.fake_client.describe_policies.assert_called_with( PolicyNames=['policy_id'])