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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ekaterina
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
Show 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,8 +44,10 @@ from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
...
@@ -44,8 +44,10 @@ 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
_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
):
capath
=
None
,
cadata
=
None
):
return
_create_default_https_context_orig
(
return
_create_default_https_context_orig
(
purpose
,
purpose
,
...
@@ -53,7 +55,7 @@ def _create_default_https_context(purpose=ssl.Purpose.SERVER_AUTH, cafile=None,
...
@@ -53,7 +55,7 @@ def _create_default_https_context(purpose=ssl.Purpose.SERVER_AUTH, cafile=None,
capath
=
capath
,
capath
=
capath
,
cadata
=
cadata
,
cadata
=
cadata
,
)
)
ssl
.
_create_default_https_context
=
_create_default_https_context
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