mirror of
https://github.com/valitydev/salt.git
synced 2024-11-06 16:45:27 +00:00
Updated data_test to match with deprecations.
This commit is contained in:
parent
9a1b86ea18
commit
6269c2088a
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user