test_synthetics.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:newrelic-cli 作者: NativeInstruments 项目源码 文件源码
def test_create_monitor_with_sla_success(self, mock):
        create_monitor_endpoint = '{}/v3/monitors'.format(self.client.base_url)
        monitor_data = self.first_monitor
        monitor_data['slaThreshold'] = 42

        mock.post(
            url=create_monitor_endpoint,
            status_code=201,
            headers={'Location': self.monitor_location}
        )
        mock.get(
            url=self.monitor_location,
            status_code=200,
            json=monitor_data
        )
        r = self.client.create_monitor(self.monitor_name, slaThreshold=42)
        self.assertDictEqual(r, self.first_monitor)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号