Skip to content

Commit 67cdd0d

Browse files
committed
fix tests for django1 by making a path() equivalent
1 parent 794811b commit 67cdd0d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

instrumentation/opentelemetry-instrumentation-django/tests/test_middleware.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@
7878
from django.urls import path
7979
else:
8080
from django.conf.urls import url as re_path
81+
def path(p, *args, **kwargs):
82+
return re_path(r"^%s$" % p, *args, **kwargs)
8183

8284
urlpatterns = [
8385
re_path(r"^traced/", traced),

0 commit comments

Comments
 (0)