Ejemplo n.º 1
0
 def test_set_target_equal(self):
     '''
     Tests return when target is already present
     '''
     alias = 'foo'
     target = '*****@*****.**'
     ret = aliases.set_target(alias, target)
     self.assertTrue(ret)
Ejemplo n.º 2
0
 def test_set_target_equal(self):
     '''
     Tests return when target is already present
     '''
     alias = 'foo'
     target = '*****@*****.**'
     ret = aliases.set_target(alias, target)
     self.assertTrue(ret)
Ejemplo n.º 3
0
 def test_set_target_equal(self):
     '''
     Tests return when target is already present
     '''
     with patch('salt.modules.aliases.get_target', MagicMock(return_value='*****@*****.**')):
         alias = 'foo'
         target = '*****@*****.**'
         ret = aliases.set_target(alias, target)
         self.assertTrue(ret)
Ejemplo n.º 4
0
 def test_set_target_equal(self):
     """
     Tests return when target is already present
     """
     with patch("salt.modules.aliases.get_target",
                MagicMock(return_value="*****@*****.**")):
         alias = "foo"
         target = "*****@*****.**"
         ret = aliases.set_target(alias, target)
         self.assertTrue(ret)
Ejemplo n.º 5
0
def alias():
    ret = aliases.set_target(alias="fred", target="bob")
    assert ret is True
    return types.SimpleNamespace(name="fred", target="bob")