diff --git a/instrumentation/opentelemetry-instrumentation-django/tests/test_middleware.py b/instrumentation/opentelemetry-instrumentation-django/tests/test_middleware.py index 1271cfaae7..838acfdb4e 100644 --- a/instrumentation/opentelemetry-instrumentation-django/tests/test_middleware.py +++ b/instrumentation/opentelemetry-instrumentation-django/tests/test_middleware.py @@ -78,8 +78,8 @@ else: from django.conf.urls import url as re_path - def path(p, *args, **kwargs): - return re_path(r"^%s$" % p, *args, **kwargs) + def path(path, *args, **kwargs): + return re_path(rf"^{path}$", *args, **kwargs) urlpatterns = [