def test_basic_metric_success(self):
    self.perform_request(self.URL)
    expected_attributes = {'http.status_code': 200, 'http.host': 'examplehost', 'net.peer.port': 8000, 'net.peer.name': 'examplehost', 'http.method': 'GET', 'http.flavor': '1.1', 'http.scheme': 'http'}
    for resource_metrics in self.memory_metrics_reader.get_metrics_data().resource_metrics:
        for scope_metrics in resource_metrics.scope_metrics:
            for metric in scope_metrics.metrics:
                for data_point in metric.data.data_points:
                    self.assertDictEqual(expected_attributes, dict(data_point.attributes))
                    self.assertEqual(data_point.count, 1)
def test_basic_metric_success(self):
    self.perform_request(self.URL)
    expected_attributes = {'http.status_code': 200, 'http.host': 'examplehost', 'net.peer.port': 8000, 'net.peer.name': 'examplehost', 'http.method': 'GET', 'http.flavor': '1.1', 'http.scheme': 'http'}
    for resource_metrics in self.memory_metrics_reader.get_metrics_data().resource_metrics:
        for scope_metrics in resource_metrics.scope_metrics:
            for metric in scope_metrics.metrics:
                for data_point in metric.data.data_points:
                    self.assertDictEqual(expected_attributes, dict(data_point.attributes))
                    self.assertEqual(data_point.count, 1)