mirror of
https://github.com/open-telemetry/opentelemetry-python-contrib.git
synced 2025-08-01 06:33:52 +08:00
14 lines
406 B
Python
14 lines
406 B
Python
|
|
from ddtrace.contrib.mysql import get_traced_mysql_connection
|
|
from tests.test_tracer import get_dummy_tracer
|
|
from tests.contrib import config
|
|
|
|
|
|
def test_pre_v4():
|
|
tracer = get_dummy_tracer()
|
|
MySQL = get_traced_mysql_connection(tracer, service='my-mysql-server')
|
|
conn = MySQL(**config.MYSQL_CONFIG)
|
|
cursor = conn.cursor()
|
|
cursor.execute('SELECT 1')
|
|
assert cursor.fetchone()[0] == 1
|