test(django): Prune redundant parametrize rows from the ASGI tests - #7158
Draft
ericapisani wants to merge 3 commits into
Draft
test(django): Prune redundant parametrize rows from the ASGI tests#7158ericapisani wants to merge 3 commits into
ericapisani wants to merge 3 commits into
Conversation
The send_default_pii dimension held every row to the same outcome: none of the expected_data values differ between the pii=True and pii=False halves of the table, so the 5 pii=False rows re-ran the assertions of their pii=True counterparts. Drop them and the now-constant dimension. Also drop the application/xml row, which exercises the same "no structured body" branch as the text/plain row already in the table.
…ad_id The arm only toggled creation of middleware spans, which this test never inspects: the streaming path skips non-segment spans, and the static path looks at profile and transaction items. Both DjangoIntegration(middleware_spans=) settings remain covered by the dedicated middleware-span tests.
test_user_identity_error_event_data_collection borrowed the shared 6-row DATA_COLLECTION_USER_INFO_CASES table, 2 rows of which cover send_default_pii vs. data_collection precedence — already asserted by the WSGI tests in test_data_scrubbing.py. Replace it with a local 4-row table covering the branches asgi.py actually takes: pii on/off crossed with data_collection user_info on/off.
Contributor
Codecov Results 📊✅ 101453 passed | ❌ 2 failed | ⏭️ 6483 skipped | Total: 107938 | Pass Rate: 93.99% | Execution Time: 355m 7s 📊 Comparison with Base Branch
➕ New Tests (2)View new tests
❌ Failed Tests
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Three independent redundancies in
asgi/test_asgi.py:test_asgi_request_body— thesend_default_piidimension held every row to the same outcome, so the 5pii=Falserows re-ran theirpii=Truecounterparts. Theapplication/xmlrow takes the same "no structured body" branch as thetext/plainrow.test_active_thread_id— themiddleware_spansarm only toggled spans this test never inspects; both settings stay covered by the dedicated middleware-span tests.test_user_identity_error_event_data_collection— swapped the shared 6-row table for a local 4-row one, dropping the 2 precedence rows already asserted by the WSGI tests intest_data_scrubbing.py.356 -> 320 cases.
Refs PY-2641
Refs #6975