Commit bf3b321
authored
Add an option to disable PII masking in get_diagnostic_data (enabled by default) (#1975)
This pull request updates the `get_diagnostic_data` method in the
`pyoverkiz` client to allow users to optionally retrieve unmasked
diagnostic data, and adds comprehensive tests to ensure the new behavior
works as intended. By default, sensitive data is still masked, but users
can now explicitly request the raw data if needed.
**Enhancements to diagnostic data retrieval:**
* The `get_diagnostic_data` method in `pyoverkiz/client.py` now accepts
a `mask_sensitive_data` parameter (defaulting to `True`), allowing
callers to choose whether to receive masked (redacted) or raw diagnostic
data. The method's docstring has been updated to reflect this new
behavior.
**Testing improvements:**
* Added `test_get_diagnostic_data_redacted_by_default` to verify that
diagnostic data is masked by default and that the obfuscation function
is called.
* Added `test_get_diagnostic_data_without_masking` to ensure that when
`mask_sensitive_data=False` is passed, the raw diagnostic data is
returned and the obfuscation function is not called.1 parent 137563c commit bf3b321
2 files changed
Lines changed: 45 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
333 | 333 | | |
334 | 334 | | |
335 | 335 | | |
336 | | - | |
| 336 | + | |
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
343 | 343 | | |
344 | | - | |
| 344 | + | |
| 345 | + | |
345 | 346 | | |
346 | 347 | | |
347 | 348 | | |
348 | | - | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
349 | 353 | | |
350 | 354 | | |
351 | 355 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
328 | 366 | | |
329 | 367 | | |
330 | 368 | | |
| |||
0 commit comments