Exemple #1
0
 def test_rm_alias_absent(self):
     '''
     Tests return when alias is not present
     '''
     with patch('salt.modules.aliases.get_target', MagicMock(return_value='')):
         ret = aliases.rm_alias('foo')
         self.assertTrue(ret)
Exemple #2
0
def test_rm_alias_absent():
    """
    Tests return when alias is not present
    """
    with patch("salt.modules.aliases.get_target", MagicMock(return_value="")):
        ret = aliases.rm_alias("foo")
        assert ret
Exemple #3
0
def test_rm_alias(alias):
    """
    aliases.rm_alias
    """
    ret = aliases.rm_alias(alias=alias.name)
    assert ret is True
    ret = aliases.list_aliases()
    assert isinstance(ret, dict)
    assert ret == {}
Exemple #4
0
 def test_rm_alias_absent(self):
     '''
     Tests return when alias is not present
     '''
     ret = aliases.rm_alias('foo')
     self.assertTrue(ret)
Exemple #5
0
 def test_rm_alias_absent(self):
     '''
     Tests return when alias is not present
     '''
     ret = aliases.rm_alias('foo')
     self.assertTrue(ret)