示例#1
0
文件: test_data.py 项目: urbas/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'))
示例#2
0
 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'))
示例#3
0
 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"))
示例#4
0
 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"))
示例#5
0
文件: test_data.py 项目: mcalmer/salt
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")
示例#6
0
 def test_cas(self):
     '''
     Test if it check and set a value in the minion datastore
     '''
     self.assertTrue(data.cas('salt', 'SALTSTACK', 'SALT'))
示例#7
0
 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'))
示例#8
0
文件: data_test.py 项目: bryson/salt
 def test_cas(self):
     '''
     Test if it check and set a value in the minion datastore
     '''
     self.assertTrue(data.cas('salt', 'SALTSTACK', 'SALT'))
示例#9
0
文件: data_test.py 项目: bryson/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'))