예제 #1
0
 def test_valid_id_exception_handler(self):
     '''
     Ensure we just return False if we pass in invalid or undefined paths.
     Refs #8259
     '''
     opts = {'pki_dir': '/tmp/whatever'}
     self.assertFalse(valid_id(opts, None))
예제 #2
0
 def test_valid_id_exception_handler(self):
     """
     Ensure we just return False if we pass in invalid or undefined paths.
     Refs #8259
     """
     opts = {"pki_dir": "/tmp/whatever"}
     self.assertFalse(valid_id(opts, None))
예제 #3
0
파일: verify_test.py 프로젝트: bryson/salt
 def test_valid_id_exception_handler(self):
     """
     Ensure we just return False if we pass in invalid or undefined paths.
     Refs #8259
     """
     opts = {"pki_dir": "/tmp/whatever"}
     self.assertFalse(valid_id(opts, None))
예제 #4
0
파일: verify_test.py 프로젝트: 1mentat/salt
 def test_valid_id_exception_handler(self):
     '''
     Ensure we just return False if we pass in invalid or undefined paths.
     Refs #8259
     '''
     opts = {'pki_dir': '/tmp/whatever'}
     self.assertFalse(valid_id(opts, None))
예제 #5
0
 def test_valid_id_pathsep(self):
     '''
     Path separators in id should make it invalid
     '''
     opts = {'pki_dir': '/tmp/whatever'}
     # We have to test both path separators because os.path.normpath will
     # convert forward slashes to backslashes on Windows.
     for pathsep in ('/', '\\'):
         self.assertFalse(valid_id(opts, pathsep.join(('..', 'foobar'))))
예제 #6
0
 def test_valid_id_pathsep(self):
     """
     Path separators in id should make it invalid
     """
     opts = {"pki_dir": "/tmp/whatever"}
     # We have to test both path separators because os.path.normpath will
     # convert forward slashes to backslashes on Windows.
     for pathsep in ("/", "\\"):
         self.assertFalse(valid_id(opts, pathsep.join(("..", "foobar"))))