SIGN IN SIGN UP

test(mysql): provide concrete DBAPI connection attributes in mocks (#4116)

* test(mysql): provide concrete DBAPI connection attributes in mocks

* test(mysql): pass concrete attributes via MagicMock helpers

* test(mysql): refactor mocks and remove redundant attribute assignments

* changelog: add mysql test mock fix entry

* test(mysql): refactor SQL commenter mocks into helper

* test(mysql): refactor SQL commenter mocks into helper

- Introduce make_mysql_commenter_mocks helper
- Remove duplicated MagicMock setup
- Preserve test assertions and behavior
- Improve readability and maintainability

* test(mysql): use concrete DBAPI connection attributes in mocks to fix attribute type warnings

* Update instrumentation/opentelemetry-instrumentation-mysql/tests/test_mysql_integration.py

---------

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
R
Ritesh Tripathi committed
413c98e542b747b14bc35d79c18c7d020662f745
Parent: 87b20ab
Committed by GitHub <noreply@github.com> on 2/20/2026, 11:32:59 AM