Пример #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
 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
 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"))))