def test_wait(self): ''' Test to wait for the tomcat manager to load ''' ret = {'name': 'salt', 'changes': {}, 'result': True, 'comment': 'tomcat manager is ready'} mock = MagicMock(return_value=True) with patch.dict(tomcat.__salt__, {"tomcat.status": mock}): self.assertDictEqual(tomcat.wait('salt'), ret)
def test_wait(): """ Test to wait for the tomcat manager to load """ ret = { "name": "salt", "changes": {}, "result": True, "comment": "tomcat manager is ready", } mock = MagicMock(return_value=True) with patch.dict( tomcat.__salt__, { "tomcat.status": mock, "tomcat.extract_war_version": tomcatmod.extract_war_version, }, ): assert tomcat.wait("salt") == ret