Skip to content

Conversation

@nwithan8
Copy link
Contributor

@nwithan8 nwithan8 commented Nov 7, 2025

Description

  • Allow non-string values for censor elements (compare string-string via conversions)

Closes #76

Testing

  • Add unit tests to test three times of censor elements with non-string values, via body content

Pull Request Type

Please select the option(s) that are relevant to this PR.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Improvement (fixing a typo, updating readme, renaming a variable name, etc)

@nwithan8 nwithan8 requested review from a team as code owners November 7, 2025 08:18
@nwithan8
Copy link
Contributor Author

nwithan8 commented Nov 7, 2025

Unit tests have been modified, rather than hitting like Reddit JSON and XML feeds, use snapshots of the r/ProgrammerHumor JSON and RSS feeds stored in this repo. #78 will need to be merged first for the unit tests to pass.

@Justintime50
Copy link
Member

@nwithan8 if you're able, do you mind rebasing master here and we can get this merged in? The static test files have been merged already.

@nwithan8 nwithan8 mentioned this pull request Dec 5, 2025
4 tasks
@nwithan8
Copy link
Contributor Author

nwithan8 commented Dec 5, 2025

Ran into issues with getting the HttpClient to actually retrieve all the XML payload, even after #78 was merged. Opened #80 to use smaller files (+ store sample data for HTML as well). Will need to be merged before this can be rebased and merged.

@Justintime50
Copy link
Member

@nwithan8 I appreciate the much smaller sample data, thanks! Feel free to rebase and I'll re-review.

@nwithan8 nwithan8 force-pushed the 76-censor-non-strings branch from f29001f to 9a8e3a7 Compare December 5, 2025 18:24
- Fix logic error causing XML inner values to be dropped rather than censored
- Add unit test for testing text censoring on HTML data
@nwithan8 nwithan8 requested a review from Justintime50 December 5, 2025 21:12
@Justintime50 Justintime50 merged commit 42bd41b into EasyPost:master Dec 8, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

KeyCensorElement is not taken into account if the value is not a string

2 participants