from unittest.mock import Mock


def _createReprMock(r):
    """Creates a mock with a __repr__ returning r

    Also provides __str__ mock with default mock behaviour"""
    mock = Mock()
    mock.__repr__ = Mock()
    mock.__repr__.return_value = r
    mock.__str__ = Mock(wraps=mock.__str__)
    return mock