unioslo / zabbix-cli

Command-line interface for Zabbix
https://unioslo.github.io/zabbix-cli/
GNU General Public License v3.0
208 stars 105 forks source link

refactor: Improve robustness of patching, add tests #261

Closed pederhan closed 3 days ago

pederhan commented 3 days ago

In order to prevent crashes when patching private methods and variables of external packages, such as the one seen in #259, this PR calls each patch_ function in a Patcher context (which really should have been done from the beginning).

Adds tests which perform rudimentary testing of each patched module attribute. Nothing in-depth, but ensures they at least work.