def test_cas_not_equal(self): ''' Test if it check and set a value in the minion datastore ''' with patch('salt.modules.data.load', MagicMock(return_value={'salt': 'SALT', 'salt1': 'SALT1'})): self.assertFalse(data.cas('salt', 'SALT', 'SALTSTACK'))
def test_cas(self): ''' Test if it check and set a value in the minion datastore ''' with patch('salt.modules.data.load', MagicMock(return_value={'salt': 'SALT', 'salt1': 'SALT1'})), \ patch('salt.modules.data.dump', MagicMock(return_value=True)): self.assertTrue(data.cas('salt', 'SALTSTACK', 'SALT'))
def test_cas(self): """ Test if it check and set a value in the minion datastore """ with patch( "salt.modules.data.load", MagicMock(return_value={"salt": "SALT", "salt1": "SALT1"}), ), patch("salt.modules.data.dump", MagicMock(return_value=True)): self.assertTrue(data.cas("salt", "SALTSTACK", "SALT"))
def test_cas_not_equal(self): """ Test if it check and set a value in the minion datastore """ with patch( "salt.modules.data.load", MagicMock(return_value={"salt": "SALT", "salt1": "SALT1"}), ): self.assertFalse(data.cas("salt", "SALT", "SALTSTACK"))
def test_cas_not_load(): """ Test if it check and set a value in the minion datastore """ with patch( "salt.modules.data.load", MagicMock(return_value={ "salt": "SALT", "salt1": "SALT1" }), ): assert not data.cas("salt3", "SALT", "SALTSTACK")
def test_cas(self): ''' Test if it check and set a value in the minion datastore ''' self.assertTrue(data.cas('salt', 'SALTSTACK', 'SALT'))
def test_cas_not_equal(self): ''' Test if it check and set a value in the minion datastore ''' self.assertFalse(data.cas('salt', 'SALT', 'SALTSTACK'))