{"library":"pytest-mockito","title":"pytest-mockito","description":"Base fixtures for using Mockito mocks with pytest. Integrates the Mockito library (a spy/mock framework) into pytest by providing fixtures that handle setup and teardown of mocks. Current version is 0.0.6.post1, with a slow release cadence.","language":"python","status":"active","last_verified":"Fri May 01","install":{"commands":["pip install pytest-mockito"],"cli":null},"imports":["def test_foo(mocker): ..."],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import pytest\nfrom mockito import when, verify\n\ndef test_example(mocker):\n    obj = {'foo': 'bar'}\n    when(obj).__getitem__('foo').thenReturn('mocked')\n    assert obj['foo'] == 'mocked'\n    verify(obj).__getitem__('foo')","lang":"python","description":"Basic test using the mocker fixture to reset mockito state automatically.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}