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"
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')
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'])
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")
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"])
def test_get(self): ''' Test if it gets a value from the minion datastore ''' self.assertEqual(data.get('salt'), 'SALT')
def test_get_vals(self): ''' Test if it gets values from the minion datastore ''' self.assertEqual(data.get(['salt', 'salt1']), ['SALT', 'SALT1'])