@@ -168,7 +168,6 @@ def test_cache_spans_disabled_templatetag(
168168 assert len (second_event ["spans" ]) == 0
169169
170170
171- @pytest .mark .forked
172171@pytest_mark_django_db_decorator ()
173172@pytest .mark .skipif (DJANGO_VERSION < (1 , 9 ), reason = "Requires Django >= 1.9" )
174173def test_cache_spans_middleware (
@@ -600,24 +599,30 @@ def test_cache_spans_get_many(sentry_init, capture_events, use_django_caching):
600599
601600 assert transaction ["spans" ][0 ]["op" ] == "cache.get"
602601 assert transaction ["spans" ][0 ]["description" ] == f"S{ id } , S{ id + 1 } "
602+ assert not transaction ["spans" ][0 ]["data" ]["cache.hit" ]
603603
604604 assert transaction ["spans" ][1 ]["op" ] == "cache.get"
605605 assert transaction ["spans" ][1 ]["description" ] == f"S{ id } "
606+ assert not transaction ["spans" ][1 ]["data" ]["cache.hit" ]
606607
607608 assert transaction ["spans" ][2 ]["op" ] == "cache.get"
608609 assert transaction ["spans" ][2 ]["description" ] == f"S{ id + 1 } "
610+ assert not transaction ["spans" ][2 ]["data" ]["cache.hit" ]
609611
610612 assert transaction ["spans" ][3 ]["op" ] == "cache.put"
611613 assert transaction ["spans" ][3 ]["description" ] == f"S{ id } "
612614
613615 assert transaction ["spans" ][4 ]["op" ] == "cache.get"
614616 assert transaction ["spans" ][4 ]["description" ] == f"S{ id } , S{ id + 1 } "
617+ assert transaction ["spans" ][4 ]["data" ]["cache.hit" ]
615618
616619 assert transaction ["spans" ][5 ]["op" ] == "cache.get"
617620 assert transaction ["spans" ][5 ]["description" ] == f"S{ id } "
621+ assert not transaction ["spans" ][1 ]["data" ]["cache.hit" ]
618622
619623 assert transaction ["spans" ][6 ]["op" ] == "cache.get"
620624 assert transaction ["spans" ][6 ]["description" ] == f"S{ id + 1 } "
625+ assert not transaction ["spans" ][1 ]["data" ]["cache.hit" ]
621626
622627
623628@pytest .mark .forked
0 commit comments