[Twisted-Python] RunningTwisted tests on Windows and SSL
John Aherne
johnaherne at rocs.co.uk
Sun Mar 18 00:51:00 MDT 2018
Some clarification on running the tests.
For the tests on test_sslverify
If I apply the patches from 6371 on python2.7.13 32bit windows2012R2, the
test_sslverify runs without error or failure.
TrustRootTests
test_caCertsPlatformDefaults ...
[OK]
test_caCertsWindows ...
[OK]
test_trustRootPlatformRejectsUntrustedCA ...
[OK]
test_trustRootSpecificCertificate ...
[OK]
============================================================
===================
[SKIPPED]
NPN/ALPN is present on this platform
twisted.test.test_sslverify.NPNAndALPNAbsentTests.test_
NPNAndALPNNotImplemented
twisted.test.test_sslverify.NPNAndALPNAbsentTests.test_
NegotiatedProtocolReturns
None
twisted.test.test_sslverify.NPNAndALPNAbsentTests.test_
nextProtocolMechanismsNoN
egotiationSupported
------------------------------------------------------------
-------------------
Ran 113 tests in 496.749s
PASSED (skips=3, successes=110)
------------------------------------------------------------
---------------------------------------------------------------------------
If I apply the patch on python3.6.3 32bit Windows10Pro, the test_sslverify
produces 1 error and 1 failure.
The test_caCertsWindows passes
Looking at the Error on test_ecDoesNotBreakConstructor, I don't see where
I can find _getEllipticCurve.
I can't see it in OpenSSLCertificateOptions. And so far google does not
help
============================================================
===================
[FAIL]
Traceback (most recent call last):
File "c:\twistedssl\twisted\src\twisted\test\test_sslverify.py", line
1292, in test_ecSuccessWithRealBindings
self.assertEqual(defaultCurve, opts._ecCurve)
File "c:\twistedssl\twisted\src\twisted\trial\_synctest.py", line 432, in
assertEqual
super(_Assertions, self).assertEqual(first, second, msg)
File "c:\program files (x86)\python36-32\Lib\unittest\case.py", line 829,
in assertEqual
assertion_func(first, second, msg=msg)
File "c:\program files (x86)\python36-32\Lib\unittest\case.py", line 822,
in _baseAssertEqual
raise self.failureException(msg)
twisted.trial.unittest.FailTest: <Curve 'prime256v1'> !=
<twisted.internet._sslverify._OpenSSLECCurve object at 0x06B4FDF0>
twisted.test.test_sslverify.OpenSSLOptionsTests.test_
ecSuccessWithRealBindings
============================================================
===================
[ERROR]
Traceback (most recent call last):
File "c:\twistedssl\twisted\src\twisted\test\test_sslverify.py", line
1254, in test_ecDoesNotBreakConstructor
sslverify.OpenSSLCertificateOptions, "_getEllipticCurve", missing)
File "c:\twistedssl\twisted\src\twisted\trial\_synctest.py", line 1086,
in patch
monkeyPatch.patch()
File "c:\twistedssl\twisted\src\twisted\python\monkey.py", line 53, in
patch
self._originals.append((obj, name, getattr(obj, name)))
builtins.AttributeError: type object 'OpenSSLCertificateOptions' has no
attribute '_getEllipticCurve'
twisted.test.test_sslverify.OpenSSLOptionsTests.test_
ecDoesNotBreakConstructor
------------------------------------------------------------
-------------------
Ran 113 tests in 185.166s
FAILED (skips=3, failures=1, errors=1, successes=108)
The following is what monkeypatch is working with
test_ecDoesNotBreakConstructor ... *******PATCH******* <class
'twisted.internet._sslverify.OpenSSLCertificateOptions'>
*******PATCH******* _getEllipticCurve
[ERROR]
test_caCertsPlatformDefaults ...
[OK]
test_caCertsWindows ...
[OK]
test_trustRootPlatformRejectsUntrustedCA ...
[OK]
Any pointers would be welcome
John Aherne
--
*John Aherne*
*www.rocs.co.uk <http://www.rocs.co.uk>*
020 7223 7567
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20180318/224455f4/attachment-0002.html>
More information about the Twisted-Python
mailing list