def test_get_thresholds_overridden(self): limit = AwsLimit('limitname', self.mock_svc, 100, 88, 99) limit.warn_percent = 1 limit.warn_count = 2 limit.crit_percent = 3 limit.crit_count = 4 assert limit._get_thresholds() == (2, 1, 4, 3)
def test_simple(self): limit = AwsLimit('limitname', self.mock_svc, 100, 1, 2) assert limit._get_thresholds() == ( None, 1, None, 2 )
def test_get_thresholds(self): limit = AwsLimit('limitname', self.mock_svc, 100, 1, 2) assert limit._get_thresholds() == ( None, 1, None, 2 )
def test_get_thresholds_overridden(self): limit = AwsLimit('limitname', self.mock_svc, 100, 88, 99) limit.warn_percent = 1 limit.warn_count = 2 limit.crit_percent = 3 limit.crit_count = 4 assert limit._get_thresholds() == ( 2, 1, 4, 3 )