def test_reset(): """ Test that reset method resets variables back to correct default values. """ n = NodeManager(startup_nodes=[{}]) n.initialize = Mock() n.reset() assert n.initialize.call_count == 0
async def test_reset(): """ Test that reset method resets variables back to correct default values. """ class AsyncMock(Mock): def __await__(self): future = asyncio.Future(loop=asyncio.get_event_loop()) future.set_result(self) result = yield from future return result n = NodeManager(startup_nodes=[{}]) n.initialize = AsyncMock() await n.reset() assert n.initialize.call_count == 1