from unittest.mock import MagicMock import sys # Create fake audioop module sys.modules['audioop'] = MagicMock() sys.modules['pyaudioop'] = MagicMock() # Don't import app here to avoid circular imports # The app will import this module, not the other way around