diff options
-rw-r--r-- | OpenSSL/test/test_crypto.py | 18 | ||||
-rw-r--r-- | OpenSSL/test/test_rand.py | 4 | ||||
-rw-r--r-- | OpenSSL/test/test_ssl.py | 22 |
3 files changed, 22 insertions, 22 deletions
diff --git a/OpenSSL/test/test_crypto.py b/OpenSSL/test/test_crypto.py index b17a743..b8c7ab1 100644 --- a/OpenSSL/test/test_crypto.py +++ b/OpenSSL/test/test_crypto.py @@ -1768,7 +1768,7 @@ class PKCS12Tests(TestCase): def test_friendly_name(self): """ - The I{friendlyName} of a PKCS12 can be set and retrieved via + The *friendlyName* of a PKCS12 can be set and retrieved via :py:obj:`PKCS12.get_friendlyname` and :py:obj:`PKCS12_set_friendlyname`, and a :py:obj:`PKCS12` with a friendly name set can be dumped with :py:obj:`PKCS12.export`. """ @@ -1818,7 +1818,7 @@ class PKCS12Tests(TestCase): def test_export_without_mac(self): """ - Exporting a PKCS12 with a :py:obj:`maciter` of C{-1} excludes the MAC + Exporting a PKCS12 with a :py:obj:`maciter` of ``-1`` excludes the MAC entirely. """ passwd = 'Lake Michigan' @@ -1891,14 +1891,14 @@ def cmdLineQuote(s): """ Internal method for quoting a single command-line argument. + See http://www.perlmonks.org/?node_id=764004 + :type: :py:obj:`str` :param s: A single unquoted string to quote for something that is expecting cmd.exe-style quoting :rtype: :py:obj:`str` :return: A cmd.exe-style quoted string - - @see: U{http://www.perlmonks.org/?node_id=764004} """ s = _cmdLineQuoteRe2.sub(r"\1\1", _cmdLineQuoteRe.sub(r'\1\1\\"', s)) return '"%s"' % s @@ -1953,7 +1953,7 @@ class FunctionTests(TestCase): def test_load_privatekey_invalid_passphrase_type(self): """ :py:obj:`load_privatekey` raises :py:obj:`TypeError` if passed a passphrase that is - neither a c{str} nor a callable. + neither a :py:obj:`str` nor a callable. """ self.assertRaises( TypeError, @@ -2210,7 +2210,7 @@ class PKCS7Tests(TestCase): def test_type_is_signed(self): """ :py:obj:`PKCS7Type.type_is_signed` returns :py:obj:`True` if the PKCS7 object is of - the type I{signed}. + the type *signed*. """ pkcs7 = load_pkcs7_data(FILETYPE_PEM, pkcs7Data) self.assertTrue(pkcs7.type_is_signed()) @@ -2228,7 +2228,7 @@ class PKCS7Tests(TestCase): def test_type_is_enveloped(self): """ :py:obj:`PKCS7Type.type_is_enveloped` returns :py:obj:`False` if the PKCS7 object is - not of the type I{enveloped}. + not of the type *enveloped*. """ pkcs7 = load_pkcs7_data(FILETYPE_PEM, pkcs7Data) self.assertFalse(pkcs7.type_is_enveloped()) @@ -2246,7 +2246,7 @@ class PKCS7Tests(TestCase): def test_type_is_signedAndEnveloped(self): """ :py:obj:`PKCS7Type.type_is_signedAndEnveloped` returns :py:obj:`False` if the PKCS7 - object is not of the type I{signed and enveloped}. + object is not of the type *signed and enveloped*. """ pkcs7 = load_pkcs7_data(FILETYPE_PEM, pkcs7Data) self.assertFalse(pkcs7.type_is_signedAndEnveloped()) @@ -2518,7 +2518,7 @@ class CRLTests(TestCase): def test_add_revoked_keyword(self): """ :py:obj:`OpenSSL.CRL.add_revoked` accepts its single argument as the - I{revoked} keyword argument. + ``revoked`` keyword argument. """ crl = CRL() revoked = Revoked() diff --git a/OpenSSL/test/test_rand.py b/OpenSSL/test/test_rand.py index cacd79c..8a3c5fe 100644 --- a/OpenSSL/test/test_rand.py +++ b/OpenSSL/test/test_rand.py @@ -109,8 +109,8 @@ class RandTests(TestCase): def test_egd_missing(self): """ - :py:obj:`OpenSSL.rand.egd` returns :py:obj:`0` or C{-1} if the EGD socket passed - to it does not exist. + :py:obj:`OpenSSL.rand.egd` returns :py:obj:`0` or :py:obj:`-1` if the + EGD socket passed to it does not exist. """ result = rand.egd(self.mktemp()) expected = (-1, 0) diff --git a/OpenSSL/test/test_ssl.py b/OpenSSL/test/test_ssl.py index 68fcfbe..cf03453 100644 --- a/OpenSSL/test/test_ssl.py +++ b/OpenSSL/test/test_ssl.py @@ -365,8 +365,8 @@ class ContextTests(TestCase, _LoopbackMixin): def test_set_mode_wrong_args(self): """ - L{Context.set_mode} raises L{TypeError} if called with the wrong - number of arguments or a non-C{int} argument. + :py:obj:`Context.set`mode} raises :py:obj:`TypeError` if called with the wrong + number of arguments or a non-:py:obj:`int` argument. """ context = Context(TLSv1_METHOD) self.assertRaises(TypeError, context.set_mode) @@ -377,7 +377,7 @@ class ContextTests(TestCase, _LoopbackMixin): if MODE_RELEASE_BUFFERS is not None: def test_set_mode(self): """ - L{Context.set_mode} accepts a mode bitvector and returns the newly + :py:obj:`Context.set_mode` accepts a mode bitvector and returns the newly set mode. """ context = Context(TLSv1_METHOD) @@ -591,8 +591,8 @@ class ContextTests(TestCase, _LoopbackMixin): def _load_verify_locations_test(self, *args): """ Create a client context which will verify the peer certificate and call - its :py:obj:`load_verify_locations` method with C{*args}. Then connect it to a - server and ensure that the handshake succeeds. + its :py:obj:`load_verify_locations` method with the given arguments. + Then connect it to a server and ensure that the handshake succeeds. """ (server, client) = socket_pair() @@ -1587,7 +1587,7 @@ class ConstantsTests(TestCase): def test_op_no_query_mtu(self): """ The value of :py:obj:`OpenSSL.SSL.OP_NO_QUERY_MTU` is 0x1000, the value of - I{SSL_OP_NO_QUERY_MTU} defined by I{openssl/ssl.h}. + :py:const:`SSL_OP_NO_QUERY_MTU` defined by :file:`openssl/ssl.h`. """ self.assertEqual(OP_NO_QUERY_MTU, 0x1000) else: @@ -1598,7 +1598,7 @@ class ConstantsTests(TestCase): def test_op_cookie_exchange(self): """ The value of :py:obj:`OpenSSL.SSL.OP_COOKIE_EXCHANGE` is 0x2000, the value - of I{SSL_OP_COOKIE_EXCHANGE} defined by I{openssl/ssl.h}. + of :py:const:`SSL_OP_COOKIE_EXCHANGE` defined by :file:`openssl/ssl.h`. """ self.assertEqual(OP_COOKIE_EXCHANGE, 0x2000) else: @@ -1609,18 +1609,18 @@ class ConstantsTests(TestCase): def test_op_no_ticket(self): """ The value of :py:obj:`OpenSSL.SSL.OP_NO_TICKET` is 0x4000, the value of - I{SSL_OP_NO_TICKET} defined by I{openssl/ssl.h}. + :py:const:`SSL_OP_NO_TICKET` defined by :file:`openssl/ssl.h`. """ self.assertEqual(OP_NO_TICKET, 0x4000) - else: +3A else: "OP_NO_TICKET unavailable - OpenSSL version may be too old" if OP_NO_COMPRESSION is not None: def test_op_no_compression(self): """ - The value of L{OpenSSL.SSL.OP_NO_COMPRESSION} is 0x20000, the value - of L{SSL_OP_NO_COMPRESSION} defined by I{openssl/ssl.h}. + The value of :py:obj:`OpenSSL.SSL.OP_NO_COMPRESSION` is 0x20000, the value + of :py:const:`SSL_OP_NO_COMPRESSION` defined by :file:`openssl/ssl.h`. """ self.assertEqual(OP_NO_COMPRESSION, 0x20000) else: |