Add initial aliases tests

This commit is contained in:
Thomas S Hatch 2012-05-13 23:51:22 -06:00
parent c5df9f6526
commit b97ec99999

View File

@ -0,0 +1,27 @@
# Import python libs
import os
import sys
import hashlib
# Import salt libs
from saltunittest import TestLoader, TextTestRunner
import integration
from integration import TestDaemon
class AliasesTest(integration.ModuleCase):
'''
Validate aliases module
'''
def test_set_target(self):
'''
aliases.set_target and aliases.get_target
'''
set_ret = self.run_function(
'aliases.set_target',
alias='fred',
target='bob')
self.assertTrue(set_ret)
tgt_ret = self.run_function(
'aliases.get_target',
alias='fred')
self.assertEqual(tgt_ret, 'target=bob')