Skip to content

Commit

Permalink
Updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
antonpirker committed May 10, 2024
1 parent 00e1aa5 commit f2d8c77
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/integrations/django/test_cache_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def test_cache_spans_middleware(
"views.decorators.cache.cache_header."
)
assert "cache.hit" not in first_event["spans"][1]["data"]
assert "cache.item_size" not in first_event["spans"][1]["data"]
assert first_event["spans"][1]["data"]["cache.item_size"] == 2
# second_event - cache.get
assert second_event["spans"][0]["op"] == "cache.get_item"
assert second_event["spans"][0]["description"].startswith(
Expand All @@ -225,7 +225,7 @@ def test_cache_spans_middleware(
"views.decorators.cache.cache_page."
)
assert second_event["spans"][1]["data"]["cache.hit"]
assert "cache.item_size" not in second_event["spans"][1]["data"]
assert second_event["spans"][1]["data"]["cache.item_size"] == 58


@pytest.mark.forked
Expand Down Expand Up @@ -269,7 +269,7 @@ def test_cache_spans_decorator(sentry_init, client, capture_events, use_django_c
"views.decorators.cache.cache_header."
)
assert "cache.hit" not in first_event["spans"][1]["data"]
assert "cache.item_size" not in first_event["spans"][1]["data"]
assert first_event["spans"][1]["data"]["cache.item_size"] == 2
# second_event - cache.get
assert second_event["spans"][1]["op"] == "cache.get_item"
assert second_event["spans"][1]["description"].startswith(
Expand All @@ -280,7 +280,7 @@ def test_cache_spans_decorator(sentry_init, client, capture_events, use_django_c
"views.decorators.cache.cache_page."
)
assert second_event["spans"][1]["data"]["cache.hit"]
assert "cache.item_size" not in second_event["spans"][0]["data"]
assert second_event["spans"][1]["data"]["cache.item_size"] == 58


@pytest.mark.forked
Expand Down Expand Up @@ -327,7 +327,7 @@ def test_cache_spans_templatetag(
"template.cache.some_identifier."
)
assert "cache.hit" not in first_event["spans"][1]["data"]
assert "cache.item_size" not in first_event["spans"][1]["data"]
assert first_event["spans"][1]["data"]["cache.item_size"] == 51
# second_event - cache.get
assert second_event["spans"][0]["op"] == "cache.get_item"
assert second_event["spans"][0]["description"].startswith(
Expand All @@ -338,7 +338,7 @@ def test_cache_spans_templatetag(
"template.cache.some_identifier."
)
assert second_event["spans"][0]["data"]["cache.hit"]
assert "cache.item_size" not in second_event["spans"][0]["data"]
assert second_event["spans"][0]["data"]["cache.item_size"] == 51


@pytest.mark.parametrize(
Expand Down

0 comments on commit f2d8c77

Please sign in to comment.