test(metadata): cover non_filterable_keys exclusion rules - #252
Closed
HarshRajSinghania wants to merge 1 commit into
Closed
HarshRajSinghania wants to merge 1 commit into
HarshRajSinghania wants to merge 1 commit into
Conversation
Add unit tests for split_metadata() denylist behavior requested in codeforstartups#245: direct exclusion, precedence over filterable_keys, namespace-tag isolation, and that the caller metadata dict is not mutated.
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.
Summary
Adds unit tests for
split_metadata()denylist behavior requested in #245.tests/test_metadata.pyalready covered thefilterable_keysallowlist. These tests covernon_filterable_keyswithout changing production code.Related issue
Closes #245
What changed
Four tests in
tests/test_metadata.py:non_filterable_keysstays in the DynamoDB copy and is omitted from S3 Vectors filter metadata.filterable_keysandnon_filterable_keys, the denylist wins._dv_nsinnon_filterable_keysdoes not strip the mandatory namespace tag thatsplit_metadata()always writes onto the S3 payload.No production code, dependencies, or docs were changed.
Testing
From a clone of
developmentwithPYTHONPATH=src(no AWS credentials):Result: 29 passed (25 existing + 4 new).
A full editable install (
pip install -e .) was not completed in this environment because the PyPI mirror returned 502s for boto3. The new tests only importdynavec.configanddynavec.metadata, which have no AWS runtime dependency.Checklist