@pytest.fixture
def mock_logger_file_handler(monkeypatch, mocker: MockerFixture):

    def mock_file_handler(*args, **kwargs):
        file_handler = mocker.stub(name='file_handler')
        file_handler.addFilter = (lambda x: x)
        file_handler.setFormatter = (lambda x: x)
        file_handler.setLevel = (lambda x: x)
        return file_handler
    monkeypatch.setattr(logging, 'FileHandler', mock_file_handler)
@pytest.fixture
def mock_logger_file_handler(monkeypatch, mocker: MockerFixture):

    def mock_file_handler(*args, **kwargs):
        file_handler = mocker.stub(name='file_handler')
        file_handler.addFilter = (lambda x: x)
        file_handler.setFormatter = (lambda x: x)
        file_handler.setLevel = (lambda x: x)
        return file_handler
    monkeypatch.setattr(logging, 'FileHandler', mock_file_handler)