Fix tests aiopg
@@ -215,12 +215,12 @@ class TestAiopgIntegration(TestBase):
spans_list = self.memory_exporter.get_finished_spans()
self.assertEqual(len(spans_list), 1)
span = spans_list[0]
- self.assertEqual(span.name, "testcomponent.testdatabase")
+ self.assertEqual(span.name, "Test query")
self.assertIs(span.kind, trace_api.SpanKind.CLIENT)
self.assertEqual(span.attributes["component"], "testcomponent")
- self.assertEqual(span.attributes["db.type"], "testtype")
- self.assertEqual(span.attributes["db.instance"], "testdatabase")
+ self.assertEqual(span.attributes["db.system"], "testcomponent")
+ self.assertEqual(span.attributes["db.name"], "testdatabase")
self.assertEqual(span.attributes["db.statement"], "Test query")
self.assertEqual(
span.attributes["db.statement.parameters"],
@@ -230,7 +230,7 @@ class TestAiopgIntegration(TestBase):
self.assertEqual(span.attributes["net.peer.name"], "testhost")
self.assertEqual(span.attributes["net.peer.port"], 123)
self.assertIs(
- span.status.status_code, trace_api.status.StatusCode.UNSET,
+ span.status.status_code, trace_api.status.StatusCode.UNSET
)
def test_span_not_recording(self):
@@ -281,7 +281,7 @@ class TestAiopgIntegration(TestBase):
span = spans_list[0]
self.assertEqual(span.attributes["db.statement"], "Test query")
self.assertIs(
- span.status.status_code, trace_api.status.StatusCode.ERROR,
+ span.status.status_code, trace_api.status.StatusCode.ERROR
)
self.assertEqual(span.status.description, "Test Exception")
