We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0d01853 commit 577b176Copy full SHA for 577b176
1 file changed
contrib/opencensus-ext-azure/tests/test_azure_heartbeat_metrics.py
@@ -89,9 +89,13 @@ def test_heartbeat_metric_init(self):
89
self.assertFalse(metric.init)
90
self.assertEqual(len(metric.properties), 0)
91
92
- # TODO @lzchen #981
93
- @unittest.skip("Failing because github workflow runs on Azure")
94
- def test_heartbeat_metric_get_metric_init(self):
+ @mock.patch(
+ 'requests.get',
+ throw(requests.exceptions.ConnectionError)
95
+ )
96
+ @mock.patch('os.environ.get')
97
+ def test_heartbeat_metric_get_metric_init(self, environ_mock):
98
+ environ_mock.return_value = None
99
metric = heartbeat_metrics.HeartbeatMetric()
100
101
metrics = metric.get_metrics()
0 commit comments