# coding=utf8

# Copyright 2018 JDCLOUD.COM
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# NOTE: This class is auto generated by the jdcloud code generator program.

import unittest
import os
import json


class MonitorTest(unittest.TestCase):

    def test_describe_alarms(self):
        cmd = """python ../../main.py monitor describe-alarms """
        with os.popen(cmd) as f:
            content = f.read()

        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_create_alarm(self):
        cmd = """python ../../main.py monitor create-alarm  --client-token 'xxx' --product 'xxx' --resource-option '{"":""}' --rule-name 'xxx' --rule-option '{"":""}'"""
        with os.popen(cmd) as f:
            content = f.read()

        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_describe_alarm(self):
        cmd = """python ../../main.py monitor describe-alarm  --alarm-id 'xxx'"""
        with os.popen(cmd) as f:
            content = f.read()

        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_update_alarm(self):
        cmd = """python ../../main.py monitor update-alarm  --alarm-id 'xxx' --product 'xxx' --resource-option '{"":""}' --rule-name 'xxx' --rule-option '{"":""}'"""
        with os.popen(cmd) as f:
            content = f.read()

        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_delete_alarms(self):
        cmd = """python ../../main.py monitor delete-alarms  --alarm-id 'xxx'"""
        with os.popen(cmd) as f:
            content = f.read()

        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_describe_alarm_contacts(self):
        cmd = """python ../../main.py monitor describe-alarm-contacts  --alarm-id 'xxx'"""
        with os.popen(cmd) as f:
            content = f.read()

        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_describe_metrics_for_alarm(self):
        cmd = """python ../../main.py monitor describe-metrics-for-alarm """
        with os.popen(cmd) as f:
            content = f.read()

        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_describe_products_for_alarm(self):
        cmd = """python ../../main.py monitor describe-products-for-alarm """
        with os.popen(cmd) as f:
            content = f.read()

        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_enable_alarms(self):
        cmd = """python ../../main.py monitor enable-alarms """
        with os.popen(cmd) as f:
            content = f.read()

        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_describe_alarm_history(self):
        cmd = """python ../../main.py monitor describe-alarm-history """
        with os.popen(cmd) as f:
            content = f.read()

        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_describe_metrics(self):
        cmd = """python ../../main.py monitor describe-metrics  --service-code 'xxx'"""
        with os.popen(cmd) as f:
            content = f.read()

        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_last_downsample(self):
        cmd = """python ../../main.py monitor last-downsample  --metric 'xxx' --service-code 'xxx' --resource-id 'xxx'"""
        with os.popen(cmd) as f:
            content = f.read()

        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_describe_metric_data(self):
        cmd = """python ../../main.py monitor describe-metric-data  --metric 'xxx' --resource-id 'xxx'"""
        with os.popen(cmd) as f:
            content = f.read()

        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_describe_tag_values(self):
        cmd = """python ../../main.py monitor describe-tag-values  --tag-key 'xxx' --service-code 'xxx' --resource-id 'xxx'"""
        with os.popen(cmd) as f:
            content = f.read()

        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_describe_services(self):
        cmd = """python ../../main.py monitor describe-services """
        with os.popen(cmd) as f:
            content = f.read()

        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_put_product_metric_data(self):
        cmd = """python ../../main.py monitor put-product-metric-data  --app-code 'xxx' --service-code 'xxx' --region 'xxx' --resource-id 'xxx' --data-points '[{"":""}]'"""
        with os.popen(cmd) as f:
            content = f.read()

        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_put_product_metric_data(self):
        cmd = """python ../../main.py monitor put-product-metric-data  --app-code 'xxx' --service-code 'xxx' --region 'xxx' --resource-id 'xxx' --data-points '[{"":""}]'"""
        with os.popen(cmd) as f:
            content = f.read()

        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_put_custom_metric_data(self):
        cmd = """python ../../main.py monitor put-custom-metric-data """
        with os.popen(cmd) as f:
            content = f.read()

        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_put_custom_metric_data(self):
        cmd = """python ../../main.py monitor put-custom-metric-data """
        with os.popen(cmd) as f:
            content = f.read()

        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_describe_custom_metric_data(self):
        cmd = """python ../../main.py monitor describe-custom-metric-data  --namespace-uid 'xxx' --query '{"":""}'"""
        with os.popen(cmd) as f:
            content = f.read()

        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)


2594c88492ebcfd64a3b696397e726e9884b1b46
<mask token>


class MonitorTest(unittest.TestCase):

    def test_describe_alarms(self):
        cmd = 'python ../../main.py monitor describe-alarms '
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_create_alarm(self):
        cmd = (
            'python ../../main.py monitor create-alarm  --client-token \'xxx\' --product \'xxx\' --resource-option \'{"":""}\' --rule-name \'xxx\' --rule-option \'{"":""}\''
            )
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_describe_alarm(self):
        cmd = "python ../../main.py monitor describe-alarm  --alarm-id 'xxx'"
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)
    <mask token>
    <mask token>

    def test_describe_alarm_contacts(self):
        cmd = (
            "python ../../main.py monitor describe-alarm-contacts  --alarm-id 'xxx'"
            )
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>

    def test_describe_tag_values(self):
        cmd = (
            "python ../../main.py monitor describe-tag-values  --tag-key 'xxx' --service-code 'xxx' --resource-id 'xxx'"
            )
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)
    <mask token>
    <mask token>

    def test_put_product_metric_data(self):
        cmd = (
            'python ../../main.py monitor put-product-metric-data  --app-code \'xxx\' --service-code \'xxx\' --region \'xxx\' --resource-id \'xxx\' --data-points \'[{"":""}]\''
            )
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_put_custom_metric_data(self):
        cmd = 'python ../../main.py monitor put-custom-metric-data '
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)
    <mask token>
    <mask token>

<mask token>


class MonitorTest(unittest.TestCase):

    def test_describe_alarms(self):
        cmd = 'python ../../main.py monitor describe-alarms '
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_create_alarm(self):
        cmd = (
            'python ../../main.py monitor create-alarm  --client-token \'xxx\' --product \'xxx\' --resource-option \'{"":""}\' --rule-name \'xxx\' --rule-option \'{"":""}\''
            )
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_describe_alarm(self):
        cmd = "python ../../main.py monitor describe-alarm  --alarm-id 'xxx'"
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)
    <mask token>
    <mask token>

    def test_describe_alarm_contacts(self):
        cmd = (
            "python ../../main.py monitor describe-alarm-contacts  --alarm-id 'xxx'"
            )
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>

    def test_describe_tag_values(self):
        cmd = (
            "python ../../main.py monitor describe-tag-values  --tag-key 'xxx' --service-code 'xxx' --resource-id 'xxx'"
            )
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)
    <mask token>
    <mask token>

    def test_put_product_metric_data(self):
        cmd = (
            'python ../../main.py monitor put-product-metric-data  --app-code \'xxx\' --service-code \'xxx\' --region \'xxx\' --resource-id \'xxx\' --data-points \'[{"":""}]\''
            )
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_put_custom_metric_data(self):
        cmd = 'python ../../main.py monitor put-custom-metric-data '
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_put_custom_metric_data(self):
        cmd = 'python ../../main.py monitor put-custom-metric-data '
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_describe_custom_metric_data(self):
        cmd = (
            'python ../../main.py monitor describe-custom-metric-data  --namespace-uid \'xxx\' --query \'{"":""}\''
            )
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

<mask token>


class MonitorTest(unittest.TestCase):

    def test_describe_alarms(self):
        cmd = 'python ../../main.py monitor describe-alarms '
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_create_alarm(self):
        cmd = (
            'python ../../main.py monitor create-alarm  --client-token \'xxx\' --product \'xxx\' --resource-option \'{"":""}\' --rule-name \'xxx\' --rule-option \'{"":""}\''
            )
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_describe_alarm(self):
        cmd = "python ../../main.py monitor describe-alarm  --alarm-id 'xxx'"
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_update_alarm(self):
        cmd = (
            'python ../../main.py monitor update-alarm  --alarm-id \'xxx\' --product \'xxx\' --resource-option \'{"":""}\' --rule-name \'xxx\' --rule-option \'{"":""}\''
            )
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_delete_alarms(self):
        cmd = "python ../../main.py monitor delete-alarms  --alarm-id 'xxx'"
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_describe_alarm_contacts(self):
        cmd = (
            "python ../../main.py monitor describe-alarm-contacts  --alarm-id 'xxx'"
            )
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_describe_metrics_for_alarm(self):
        cmd = 'python ../../main.py monitor describe-metrics-for-alarm '
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_describe_products_for_alarm(self):
        cmd = 'python ../../main.py monitor describe-products-for-alarm '
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)
    <mask token>
    <mask token>
    <mask token>

    def test_last_downsample(self):
        cmd = (
            "python ../../main.py monitor last-downsample  --metric 'xxx' --service-code 'xxx' --resource-id 'xxx'"
            )
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_describe_metric_data(self):
        cmd = (
            "python ../../main.py monitor describe-metric-data  --metric 'xxx' --resource-id 'xxx'"
            )
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_describe_tag_values(self):
        cmd = (
            "python ../../main.py monitor describe-tag-values  --tag-key 'xxx' --service-code 'xxx' --resource-id 'xxx'"
            )
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_describe_services(self):
        cmd = 'python ../../main.py monitor describe-services '
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_put_product_metric_data(self):
        cmd = (
            'python ../../main.py monitor put-product-metric-data  --app-code \'xxx\' --service-code \'xxx\' --region \'xxx\' --resource-id \'xxx\' --data-points \'[{"":""}]\''
            )
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_put_product_metric_data(self):
        cmd = (
            'python ../../main.py monitor put-product-metric-data  --app-code \'xxx\' --service-code \'xxx\' --region \'xxx\' --resource-id \'xxx\' --data-points \'[{"":""}]\''
            )
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_put_custom_metric_data(self):
        cmd = 'python ../../main.py monitor put-custom-metric-data '
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_put_custom_metric_data(self):
        cmd = 'python ../../main.py monitor put-custom-metric-data '
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_describe_custom_metric_data(self):
        cmd = (
            'python ../../main.py monitor describe-custom-metric-data  --namespace-uid \'xxx\' --query \'{"":""}\''
            )
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

import unittest
import os
import json


class MonitorTest(unittest.TestCase):

    def test_describe_alarms(self):
        cmd = 'python ../../main.py monitor describe-alarms '
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_create_alarm(self):
        cmd = (
            'python ../../main.py monitor create-alarm  --client-token \'xxx\' --product \'xxx\' --resource-option \'{"":""}\' --rule-name \'xxx\' --rule-option \'{"":""}\''
            )
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_describe_alarm(self):
        cmd = "python ../../main.py monitor describe-alarm  --alarm-id 'xxx'"
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_update_alarm(self):
        cmd = (
            'python ../../main.py monitor update-alarm  --alarm-id \'xxx\' --product \'xxx\' --resource-option \'{"":""}\' --rule-name \'xxx\' --rule-option \'{"":""}\''
            )
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_delete_alarms(self):
        cmd = "python ../../main.py monitor delete-alarms  --alarm-id 'xxx'"
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_describe_alarm_contacts(self):
        cmd = (
            "python ../../main.py monitor describe-alarm-contacts  --alarm-id 'xxx'"
            )
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_describe_metrics_for_alarm(self):
        cmd = 'python ../../main.py monitor describe-metrics-for-alarm '
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_describe_products_for_alarm(self):
        cmd = 'python ../../main.py monitor describe-products-for-alarm '
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_enable_alarms(self):
        cmd = 'python ../../main.py monitor enable-alarms '
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_describe_alarm_history(self):
        cmd = 'python ../../main.py monitor describe-alarm-history '
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_describe_metrics(self):
        cmd = (
            "python ../../main.py monitor describe-metrics  --service-code 'xxx'"
            )
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_last_downsample(self):
        cmd = (
            "python ../../main.py monitor last-downsample  --metric 'xxx' --service-code 'xxx' --resource-id 'xxx'"
            )
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_describe_metric_data(self):
        cmd = (
            "python ../../main.py monitor describe-metric-data  --metric 'xxx' --resource-id 'xxx'"
            )
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_describe_tag_values(self):
        cmd = (
            "python ../../main.py monitor describe-tag-values  --tag-key 'xxx' --service-code 'xxx' --resource-id 'xxx'"
            )
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_describe_services(self):
        cmd = 'python ../../main.py monitor describe-services '
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_put_product_metric_data(self):
        cmd = (
            'python ../../main.py monitor put-product-metric-data  --app-code \'xxx\' --service-code \'xxx\' --region \'xxx\' --resource-id \'xxx\' --data-points \'[{"":""}]\''
            )
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_put_product_metric_data(self):
        cmd = (
            'python ../../main.py monitor put-product-metric-data  --app-code \'xxx\' --service-code \'xxx\' --region \'xxx\' --resource-id \'xxx\' --data-points \'[{"":""}]\''
            )
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_put_custom_metric_data(self):
        cmd = 'python ../../main.py monitor put-custom-metric-data '
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_put_custom_metric_data(self):
        cmd = 'python ../../main.py monitor put-custom-metric-data '
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_describe_custom_metric_data(self):
        cmd = (
            'python ../../main.py monitor describe-custom-metric-data  --namespace-uid \'xxx\' --query \'{"":""}\''
            )
        with os.popen(cmd) as f:
            content = f.read()
        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

# coding=utf8

# Copyright 2018 JDCLOUD.COM
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# NOTE: This class is auto generated by the jdcloud code generator program.

import unittest
import os
import json


class MonitorTest(unittest.TestCase):

    def test_describe_alarms(self):
        cmd = """python ../../main.py monitor describe-alarms """
        with os.popen(cmd) as f:
            content = f.read()

        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_create_alarm(self):
        cmd = """python ../../main.py monitor create-alarm  --client-token 'xxx' --product 'xxx' --resource-option '{"":""}' --rule-name 'xxx' --rule-option '{"":""}'"""
        with os.popen(cmd) as f:
            content = f.read()

        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_describe_alarm(self):
        cmd = """python ../../main.py monitor describe-alarm  --alarm-id 'xxx'"""
        with os.popen(cmd) as f:
            content = f.read()

        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_update_alarm(self):
        cmd = """python ../../main.py monitor update-alarm  --alarm-id 'xxx' --product 'xxx' --resource-option '{"":""}' --rule-name 'xxx' --rule-option '{"":""}'"""
        with os.popen(cmd) as f:
            content = f.read()

        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_delete_alarms(self):
        cmd = """python ../../main.py monitor delete-alarms  --alarm-id 'xxx'"""
        with os.popen(cmd) as f:
            content = f.read()

        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_describe_alarm_contacts(self):
        cmd = """python ../../main.py monitor describe-alarm-contacts  --alarm-id 'xxx'"""
        with os.popen(cmd) as f:
            content = f.read()

        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_describe_metrics_for_alarm(self):
        cmd = """python ../../main.py monitor describe-metrics-for-alarm """
        with os.popen(cmd) as f:
            content = f.read()

        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_describe_products_for_alarm(self):
        cmd = """python ../../main.py monitor describe-products-for-alarm """
        with os.popen(cmd) as f:
            content = f.read()

        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_enable_alarms(self):
        cmd = """python ../../main.py monitor enable-alarms """
        with os.popen(cmd) as f:
            content = f.read()

        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_describe_alarm_history(self):
        cmd = """python ../../main.py monitor describe-alarm-history """
        with os.popen(cmd) as f:
            content = f.read()

        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_describe_metrics(self):
        cmd = """python ../../main.py monitor describe-metrics  --service-code 'xxx'"""
        with os.popen(cmd) as f:
            content = f.read()

        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_last_downsample(self):
        cmd = """python ../../main.py monitor last-downsample  --metric 'xxx' --service-code 'xxx' --resource-id 'xxx'"""
        with os.popen(cmd) as f:
            content = f.read()

        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_describe_metric_data(self):
        cmd = """python ../../main.py monitor describe-metric-data  --metric 'xxx' --resource-id 'xxx'"""
        with os.popen(cmd) as f:
            content = f.read()

        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_describe_tag_values(self):
        cmd = """python ../../main.py monitor describe-tag-values  --tag-key 'xxx' --service-code 'xxx' --resource-id 'xxx'"""
        with os.popen(cmd) as f:
            content = f.read()

        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_describe_services(self):
        cmd = """python ../../main.py monitor describe-services """
        with os.popen(cmd) as f:
            content = f.read()

        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_put_product_metric_data(self):
        cmd = """python ../../main.py monitor put-product-metric-data  --app-code 'xxx' --service-code 'xxx' --region 'xxx' --resource-id 'xxx' --data-points '[{"":""}]'"""
        with os.popen(cmd) as f:
            content = f.read()

        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_put_product_metric_data(self):
        cmd = """python ../../main.py monitor put-product-metric-data  --app-code 'xxx' --service-code 'xxx' --region 'xxx' --resource-id 'xxx' --data-points '[{"":""}]'"""
        with os.popen(cmd) as f:
            content = f.read()

        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_put_custom_metric_data(self):
        cmd = """python ../../main.py monitor put-custom-metric-data """
        with os.popen(cmd) as f:
            content = f.read()

        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_put_custom_metric_data(self):
        cmd = """python ../../main.py monitor put-custom-metric-data """
        with os.popen(cmd) as f:
            content = f.read()

        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

    def test_describe_custom_metric_data(self):
        cmd = """python ../../main.py monitor describe-custom-metric-data  --namespace-uid 'xxx' --query '{"":""}'"""
        with os.popen(cmd) as f:
            content = f.read()

        print(content)
        result = json.loads(content)
        self.assertIsInstance(result, dict)

