I am trying to write an integration test for my python app and having trouble coming up with a good way to mock the logger. Under my tests, I have the following
assert os.system(f"cd {TEST_PATH}; python ../../happy.py apply") == 256
This is working fine but I want to mock a method inside happy.py which is responsible to create a logger so that my tests do not log. How do I do that?
I appreciate any inputs.