Skip to content

Commit

Permalink
Extend the test_cached_template since it requires a rewrite of the ca…
Browse files Browse the repository at this point in the history
…che template call.
  • Loading branch information
wantsui committed Feb 20, 2025
1 parent 49e6291 commit 23b907e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/contrib/django/test_django.py
Original file line number Diff line number Diff line change
Expand Up @@ -1454,12 +1454,18 @@ def test_cached_view(client, test_spans):
assert span_header.get_tags() == expected_meta_header


@flaky(
1742502871,
reason=(
"This test fails when the entire test suite runs, but not when you run it in isolation. "
"It looks like it fails because the cache call doesn't return two cache spans."
),
)
@pytest.mark.django_db
def test_cached_template(client, test_spans):
# make the first request so that the view is cached
response = client.get("/cached-template/")
assert response.status_code == 200

# check the first call for a non-cached view
spans = list(test_spans.filter_spans(name="django.cache"))
assert len(spans) == 2
Expand Down

0 comments on commit 23b907e

Please sign in to comment.