Skip to content

Commit

Permalink
only name is one word (tests fix)
Browse files Browse the repository at this point in the history
  • Loading branch information
krnr committed Sep 28, 2022
1 parent 1ad4dd1 commit e287069
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,15 @@ def test_instrumented_execute_method_without_arguments(self, *_, **__):
self.check_span(spans[0])
self.assertEqual(spans[0].name, "SELECT")
self.assertEqual(
spans[0].attributes[SpanAttributes.DB_STATEMENT], "SELECT"
spans[0].attributes[SpanAttributes.DB_STATEMENT], "SELECT 42;"
)

def test_instrumented_fetch_method_without_arguments(self, *_, **__):
async_call(self._connection.fetch("SELECT 42;"))
spans = self.memory_exporter.get_finished_spans()
self.assertEqual(len(spans), 1)
self.check_span(spans[0])
self.assertEqual(spans[0].name, "SELECT")
self.assertEqual(
spans[0].attributes[SpanAttributes.DB_STATEMENT], "SELECT 42;"
)
Expand Down Expand Up @@ -191,7 +192,7 @@ def test_instrumented_execute_method_with_arguments(self, *_, **__):
self.check_span(spans[0])
self.assertEqual(spans[0].name, "SELECT")
self.assertEqual(
spans[0].attributes[SpanAttributes.DB_STATEMENT], "SELECT"
spans[0].attributes[SpanAttributes.DB_STATEMENT], "SELECT $1;"
)
self.assertEqual(
spans[0].attributes["db.statement.parameters"], "('1',)"
Expand All @@ -203,6 +204,7 @@ def test_instrumented_fetch_method_with_arguments(self, *_, **__):
self.assertEqual(len(spans), 1)

self.check_span(spans[0])
self.assertEqual(spans[0].name, "SELECT")
self.assertEqual(
spans[0].attributes[SpanAttributes.DB_STATEMENT], "SELECT $1;"
)
Expand Down

0 comments on commit e287069

Please sign in to comment.