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)
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
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 == {}
def test_rm_alias_absent(self): ''' Tests return when alias is not present ''' ret = aliases.rm_alias('foo') self.assertTrue(ret)