from unittest.mock import Mock class TestMockMainwindown(Mock): def __init__(self, module_name=''): self.module_name = 'Test' def test_nothing(self): print(self.module_name)