<reponame>mabel-dev/mabel<gh_stars>0
from helpers import Mock
from rich import traceback

traceback.install()


def test_mock():

    mock = Mock(
        {"name": "<NAME>", "child": Mock({"name": "My parent is a Mock"})}, ["name"]
    )

    assert mock.name == "<NAME>"
    assert mock.rank() == "rank"
    assert isinstance(mock.child(), Mock)
    assert mock.child().name() == "My parent is a Mock"


if __name__ == "__main__":  # pragma: no cover
    test_mock()

from helpers import Mock
from rich import traceback

traceback.install()


def test_mock():

    mock = Mock(
        {"name": "<NAME>", "child": Mock({"name": "My parent is a Mock"})}, ["name"]
    )

    assert mock.name == "<NAME>"
    assert mock.rank() == "rank"
    assert isinstance(mock.child(), Mock)
    assert mock.child().name() == "My parent is a Mock"


if __name__ == "__main__":  # pragma: no cover
    test_mock()
# pragma: no cover