Open edthedev opened 2 months ago
This would support test suite updates in https://github.com/techservicesillinois/secops-splunk-illinois-midpoint
Alternately, update our examples in README to show pulling hostname from the environment (and a default CLEANED value) and passing it into clean_url
.
Blocks #35, for practical purposes.
Those proposed cleaners will be much more useful if we have this feature merged first.
Context
Currently the
clean_if
decorator requires supplying the full URL, which is brittle.For example:
would be much nicer as:
or, as a stretch goal:
Tasks
path
which strips everything to the left of the first/
, before making a comparison.path_contains
so that partial path matches are simplerReference:
https://github.com/techservicesillinois/secops-splunk-illinois-midpoint/blob/d16ba37a7329b691f693ceef829d9ad8b08aa043/tests/conftest.py#L83
https://github.com/techservicesillinois/vcrpy-cleaner/blob/9b4c3b816d735a31ccefbe2fa17bc57ea7ef5026/src/vcr_cleaner/__init__.py#L31C1-L31C24