Пример #1
0
def test_get():
    """
    Test if it gets a value from the minion datastore
    """
    with patch("salt.modules.data.load",
               MagicMock(return_value={"salt": "SALT"})):
        assert data.get("salt") == "SALT"
Пример #2
0
 def test_get(self):
     '''
     Test if it gets a value from the minion datastore
     '''
     with patch('salt.modules.data.load',
                MagicMock(return_value={'salt': 'SALT'})):
         self.assertEqual(data.get('salt'), 'SALT')
Пример #3
0
 def test_get_vals(self):
     '''
     Test if it gets values from the minion datastore
     '''
     with patch('salt.modules.data.load',
                MagicMock(return_value={'salt': 'SALT', 'salt1': 'SALT1'})):
         self.assertEqual(data.get(['salt', 'salt1']), ['SALT', 'SALT1'])
Пример #4
0
 def test_get(self):
     """
     Test if it gets a value from the minion datastore
     """
     with patch("salt.modules.data.load",
                MagicMock(return_value={"salt": "SALT"})):
         self.assertEqual(data.get("salt"), "SALT")
Пример #5
0
 def test_get_vals(self):
     """
     Test if it gets values from the minion datastore
     """
     with patch(
         "salt.modules.data.load",
         MagicMock(return_value={"salt": "SALT", "salt1": "SALT1"}),
     ):
         self.assertEqual(data.get(["salt", "salt1"]), ["SALT", "SALT1"])
Пример #6
0
 def test_get(self):
     '''
     Test if it gets a value from the minion datastore
     '''
     self.assertEqual(data.get('salt'), 'SALT')
Пример #7
0
 def test_get_vals(self):
     '''
     Test if it gets values from the minion datastore
     '''
     self.assertEqual(data.get(['salt', 'salt1']), ['SALT', 'SALT1'])
Пример #8
0
 def test_get(self):
     '''
     Test if it gets a value from the minion datastore
     '''
     self.assertEqual(data.get('salt'), 'SALT')
Пример #9
0
 def test_get_vals(self):
     '''
     Test if it gets values from the minion datastore
     '''
     self.assertEqual(data.get(['salt', 'salt1']), ['SALT', 'SALT1'])