* Unit tests: replace mock and compat with code from community.internal_test_tools (#9921)
* Replace compat with equivalent from community.internal_test_tools.
* Replace mock with equivalent from community.internal_test_tools.
* Remove ignore.txt entries.
* Add test that's no longer present in later versions.
* gomebrew: Move repeated logic from homebrew modules into module_utils
Fixes#8323.
* ghangelog + unit test improvement
* Update changelogs/fragments/8323-refactor-homebrew-logic-module-utils.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>