Commit 1038d441 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

tests: specify svn.erp5.org certificate file.

python 2.7.9 validates certificates by default.
parent b9955bfa
-----BEGIN CERTIFICATE-----
MIIEAzCCA2ygAwIBAgIJAMrO5Fn3rjFgMA0GCSqGSIb3DQEBBQUAMIGYMQswCQYD
VQQGEwJGUjEbMBkGA1UECBMSTm9yZCBQYXMgZGUgQ2FsYWlzMRkwFwYDVQQHExBN
YXJjcSBlbiBCYXJvZXVsMRIwEAYDVQQKEwlOZXhlZGkgU0ExGDAWBgNVBAMTD21h
aWwubmV4ZWRpLmNvbTEjMCEGCSqGSIb3DQEJARYUd2VibWFzdGVyQG5leGVkaS5j
b20wHhcNMDgwNTIyMTM0MzAxWhcNMTgwNTIwMTM0MzAxWjCBmDELMAkGA1UEBhMC
RlIxGzAZBgNVBAgTEk5vcmQgUGFzIGRlIENhbGFpczEZMBcGA1UEBxMQTWFyY3Eg
ZW4gQmFyb2V1bDESMBAGA1UEChMJTmV4ZWRpIFNBMRgwFgYDVQQDEw9tYWlsLm5l
eGVkaS5jb20xIzAhBgkqhkiG9w0BCQEWFHdlYm1hc3RlckBuZXhlZGkuY29tMIGf
MA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDorxW0h825nM0JlhqcqZFIY814cYQw
LRm2n3Lz1yYhO6dyHE4eBZAEu80/NcXUajNmbXuNqq6VzmH9hrbDY/2UPydp1KYu
wuwkdmpI1cLx7YHMlGe2L+0uJCc1d3nMMV7ga16a1G/X9ajed2y3/QjZe6Bf7d9o
o2aqx+uy7bOCYwIDAQABo4IBUTCCAU0wHQYDVR0OBBYEFFeJwgjNclT+IM9/tRgs
CJWlFgf0MIHNBgNVHSMEgcUwgcKAFFeJwgjNclT+IM9/tRgsCJWlFgf0oYGepIGb
MIGYMQswCQYDVQQGEwJGUjEbMBkGA1UECBMSTm9yZCBQYXMgZGUgQ2FsYWlzMRkw
FwYDVQQHExBNYXJjcSBlbiBCYXJvZXVsMRIwEAYDVQQKEwlOZXhlZGkgU0ExGDAW
BgNVBAMTD21haWwubmV4ZWRpLmNvbTEjMCEGCSqGSIb3DQEJARYUd2VibWFzdGVy
QG5leGVkaS5jb22CCQDKzuRZ964xYDAMBgNVHRMEBTADAQH/ME4GA1UdEQRHMEWC
FHJvdW5kY3ViZS5uZXhlZGkuY29tgg5pbXAubmV4ZWRpLm9yZ4IMc3ZuLmVycDUu
b3Jngg9jaGF0Lm5leGVkaS5jb20wDQYJKoZIhvcNAQEFBQADgYEAUAfUIoDP402k
tEA1gpIh2sA+fapHJXXgm0j6Km07L3SNVP/3C5W7dI8KOCzRmLkb6O9unzz+ORar
Ao4LfsAdwcta3vSd5berori7WUMeigY6ZdAaHbbxDAHJ/+dSnd2rlcRHdiFm8SJm
D4nmpPp2u/So0/VLP2zGlsAz+vAK/BM=
-----END CERTIFICATE-----
......@@ -42,6 +42,19 @@ from Products.ERP5.Tool.TemplateTool import BusinessTemplateUnknownError
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
# Specify svn.erp5.org certificate file.
import ssl
_create_default_https_context_orig = ssl._create_default_https_context
def _create_default_https_context(purpose=ssl.Purpose.SERVER_AUTH, cafile=None,
capath=None, cadata=None):
return _create_default_https_context_orig(
purpose,
cafile=os.path.join(os.path.dirname(__file__), 'svn.erp5.org.cert'),
capath=capath,
cadata=cadata,
)
ssl._create_default_https_context = _create_default_https_context
class TestTemplateTool(ERP5TypeTestCase):
"""
Test the template tool
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment