예제 #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)
예제 #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
예제 #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 == {}
예제 #4
0
파일: test_aliases.py 프로젝트: vindir/salt
 def test_rm_alias_absent(self):
     '''
     Tests return when alias is not present
     '''
     ret = aliases.rm_alias('foo')
     self.assertTrue(ret)
예제 #5
0
 def test_rm_alias_absent(self):
     '''
     Tests return when alias is not present
     '''
     ret = aliases.rm_alias('foo')
     self.assertTrue(ret)