Exemple #1
0
 def test_update_ports_tree(self):
     '''
     Test if it updates the ports tree, either the default
     or the `ports_tree` specified.
     '''
     mock = MagicMock(return_value='salt stack')
     with patch.dict(poudriere.__salt__, {'cmd.run': mock}):
         self.assertEqual(poudriere.update_ports_tree('staging'),
                          'salt stack')
Exemple #2
0
 def test_update_ports_tree(self):
     '''
     Test if it updates the ports tree, either the default
     or the `ports_tree` specified.
     '''
     mock = MagicMock(return_value='salt stack')
     with patch.dict(poudriere.__salt__, {'cmd.run': mock}):
         self.assertEqual(poudriere.update_ports_tree('staging'),
                          'salt stack')
def test_update_ports_tree():
    """
    Test if it updates the ports tree, either the default
    or the `ports_tree` specified.
    """
    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.update_ports_tree("staging") == "salt stack"
Exemple #4
0
 def test_update_ports_tree(self):
     '''
     Test if it updates the ports tree, either the default
     or the `ports_tree` specified.
     '''
     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.assertEqual(poudriere.update_ports_tree('staging'),
                          'salt stack')