Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
7dbee586
Commit
7dbee586
authored
Sep 23, 2015
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testTemplateTool: support python < 2.7.9 when patching ssl to accept certificate
This is fuxip for
1038d441
parent
666709fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
10 deletions
+12
-10
product/ERP5/tests/testTemplateTool.py
product/ERP5/tests/testTemplateTool.py
+12
-10
No files found.
product/ERP5/tests/testTemplateTool.py
View file @
7dbee586
...
@@ -44,16 +44,18 @@ from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
...
@@ -44,16 +44,18 @@ from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
# Specify svn.erp5.org certificate file.
# Specify svn.erp5.org certificate file.
import
ssl
import
ssl
_create_default_https_context_orig
=
ssl
.
_create_default_https_context
if
hasattr
(
ssl
,
'_create_default_https_context'
):
def
_create_default_https_context
(
purpose
=
ssl
.
Purpose
.
SERVER_AUTH
,
cafile
=
None
,
# On python >= 2.7.9 we patch ssl module to accept our svn.erp5.org certificate
capath
=
None
,
cadata
=
None
):
_create_default_https_context_orig
=
ssl
.
_create_default_https_context
return
_create_default_https_context_orig
(
def
_create_default_https_context
(
purpose
=
ssl
.
Purpose
.
SERVER_AUTH
,
cafile
=
None
,
purpose
,
capath
=
None
,
cadata
=
None
):
cafile
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'svn.erp5.org.cert'
),
return
_create_default_https_context_orig
(
capath
=
capath
,
purpose
,
cadata
=
cadata
,
cafile
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'svn.erp5.org.cert'
),
)
capath
=
capath
,
ssl
.
_create_default_https_context
=
_create_default_https_context
cadata
=
cadata
,
)
ssl
.
_create_default_https_context
=
_create_default_https_context
class
TestTemplateTool
(
ERP5TypeTestCase
):
class
TestTemplateTool
(
ERP5TypeTestCase
):
"""Test the template tool
"""Test the template tool
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment