Fix : Added implementation for CloudWatch Describe Metric for Alarm (#3148)

* Fix : added implementation for CloudWatch Describe Metric for Alarm

* Linting

Co-authored-by: Bert Blommers <info@bertblommers.nl>
This commit is contained in:
usmangani1 2020-07-18 15:17:53 +05:30 committed by GitHub
commit 09b764148c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 100 additions and 1 deletions

View file

@ -127,6 +127,22 @@ def test_describe_alarms():
alarms.should.have.length_of(0)
@mock_cloudwatch_deprecated
def test_describe_alarms_for_metric():
conn = boto.connect_cloudwatch()
conn.create_alarm(alarm_fixture(name="nfoobar", action="afoobar"))
conn.create_alarm(alarm_fixture(name="nfoobaz", action="afoobaz"))
conn.create_alarm(alarm_fixture(name="nbarfoo", action="abarfoo"))
conn.create_alarm(alarm_fixture(name="nbazfoo", action="abazfoo"))
alarms = conn.describe_alarms_for_metric("nbarfoo_metric", "nbarfoo_namespace")
alarms.should.have.length_of(1)
alarms = conn.describe_alarms_for_metric("nbazfoo_metric", "nbazfoo_namespace")
alarms.should.have.length_of(1)
@mock_cloudwatch_deprecated
def test_get_metric_statistics():
conn = boto.connect_cloudwatch()