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
138
Merge Requests
138
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
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
b7d378e6
Commit
b7d378e6
authored
Oct 10, 2022
by
Kazuhiko Shiozaki
Committed by
Jérome Perrin
Mar 06, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
py2/py3: modefnize -f urllib_six product/ERP5OOo/tests/testIngestion.py
parent
8a990a1a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
product/ERP5OOo/tests/testIngestion.py
product/ERP5OOo/tests/testIngestion.py
+4
-5
No files found.
product/ERP5OOo/tests/testIngestion.py
View file @
b7d378e6
...
@@ -50,10 +50,9 @@ from zExceptions import BadRequest
...
@@ -50,10 +50,9 @@ from zExceptions import BadRequest
from
zExceptions
import
Redirect
from
zExceptions
import
Redirect
import
ZPublisher.HTTPRequest
import
ZPublisher.HTTPRequest
from
unittest
import
expectedFailure
from
unittest
import
expectedFailure
import
urllib
import
urllib2
import
six.moves.http_client
import
six.moves.http_client
import
six.moves.urllib.parse
import
six.moves.urllib.parse
,
six
.
moves
.
urllib
.
request
import
base64
import
base64
import
mock
import
mock
...
@@ -2050,7 +2049,7 @@ return result
...
@@ -2050,7 +2049,7 @@ return result
uri
=
'%(protocol)s://%(hostname)s'
%
url_dict
uri
=
'%(protocol)s://%(hostname)s'
%
url_dict
push_url
=
'%s%s/newContent'
%
(
uri
,
self
.
portal
.
portal_contributions
.
getPath
(),)
push_url
=
'%s%s/newContent'
%
(
uri
,
self
.
portal
.
portal_contributions
.
getPath
(),)
request
=
urllib2
.
Request
(
push_url
,
urllib
.
urlencode
(
request
=
six
.
moves
.
urllib
.
request
.
Request
(
push_url
,
six
.
moves
.
urllib
.
parse
.
urlencode
(
{
'data'
:
data
,
{
'data'
:
data
,
'filename'
:
filename
,
'filename'
:
filename
,
'reference'
:
reference
,
'reference'
:
reference
,
...
@@ -2061,7 +2060,7 @@ return result
...
@@ -2061,7 +2060,7 @@ return result
})
})
# disable_cookie_login__ is required to force zope to raise Unauthorized (401)
# disable_cookie_login__ is required to force zope to raise Unauthorized (401)
# then HTTPDigestAuthHandler can perform HTTP Authentication
# then HTTPDigestAuthHandler can perform HTTP Authentication
response
=
urllib2
.
urlopen
(
request
)
response
=
six
.
moves
.
urllib
.
request
.
urlopen
(
request
)
self
.
assertEqual
(
response
.
getcode
(),
six
.
moves
.
http_client
.
OK
)
self
.
assertEqual
(
response
.
getcode
(),
six
.
moves
.
http_client
.
OK
)
self
.
tic
()
self
.
tic
()
document
=
self
.
portal
.
portal_catalog
.
getResultValue
(
portal_type
=
'Spreadsheet'
,
document
=
self
.
portal
.
portal_catalog
.
getResultValue
(
portal_type
=
'Spreadsheet'
,
...
...
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