Updated data_test to match with deprecations.

This commit is contained in:
justinta89 2016-02-08 15:43:12 -07:00
parent 9a1b86ea18
commit 6269c2088a

View File

@ -90,16 +90,14 @@ class DataTestCase(TestCase):
'''
self.assertTrue(data.update('foo', 'salt'))
# 'getval' function tests: 1
# 'get function tests: 2
@patch('salt.modules.data.load', MagicMock(return_value={'salt': 'SALT'}))
def test_get(self):
'''
Test if it gets a value from the minion datastore
'''
self.assertEqual(data.getval('salt'), 'SALT')
# 'getvals' function tests: 1
self.assertEqual(data.get('salt'), 'SALT')
@patch('salt.modules.data.load',
MagicMock(return_value={'salt': 'SALT', 'salt1': 'SALT1'}))
@ -107,7 +105,7 @@ class DataTestCase(TestCase):
'''
Test if it gets values from the minion datastore
'''
self.assertEqual(data.getvals(['salt', 'salt1']), ['SALT', 'SALT1'])
self.assertEqual(data.get['salt', 'salt1']), ['SALT', 'SALT1'])
# 'cas' function tests: 1