예제 #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'))