Ejemplo n.º 1
0
 def test_list_jails(self):
     '''
     Test if it return a list of current jails managed by poudriere.
     '''
     mock = MagicMock(return_value='salt stack')
     with patch.dict(poudriere.__salt__, {'cmd.run': mock}):
         self.assertListEqual(poudriere.list_jails(), ['salt stack'])
Ejemplo n.º 2
0
 def test_list_jails(self):
     '''
     Test if it return a list of current jails managed by poudriere.
     '''
     mock = MagicMock(return_value='salt stack')
     with patch.dict(poudriere.__salt__, {'cmd.run': mock}):
         self.assertListEqual(poudriere.list_jails(), ['salt stack'])
Ejemplo n.º 3
0
def test_list_jails():
    """
    Test if it return a list of current jails managed by poudriere.
    """
    mock = MagicMock(return_value="salt stack")
    with patch.dict(poudriere.__salt__, {"cmd.run": mock}), patch(
            "salt.modules.poudriere._check_config_exists",
            MagicMock(return_value=True)):
        assert poudriere.list_jails() == ["salt stack"]
Ejemplo n.º 4
0
 def test_list_jails(self):
     '''
     Test if it return a list of current jails managed by poudriere.
     '''
     mock = MagicMock(return_value='salt stack')
     with patch.dict(poudriere.__salt__, {'cmd.run': mock}), \
             patch('salt.modules.poudriere._check_config_exists',
                   MagicMock(return_value=True)):
         self.assertListEqual(poudriere.list_jails(), ['salt stack'])