示例#1
0
 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)
示例#2
0
 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)
示例#3
0
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