Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin
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
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
wendelin
Commits
e660251a
Commit
e660251a
authored
Nov 18, 2024
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
py3: use six.moves.urllib
parent
1bcc7f6a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
bt5/erp5_mqtt/TestTemplateItem/portal_components/test.erp5.testMQTTMessage.py
...mplateItem/portal_components/test.erp5.testMQTTMessage.py
+2
-2
bt5/erp5_wendelin/TestTemplateItem/portal_components/test.erp5.testWendelin.py
...tTemplateItem/portal_components/test.erp5.testWendelin.py
+2
-2
No files found.
bt5/erp5_mqtt/TestTemplateItem/portal_components/test.erp5.testMQTTMessage.py
View file @
e660251a
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
import
string
import
string
import
random
import
random
import
urllib
import
six.moves.urllib
as
urllib
import
msgpack
import
msgpack
from
six.moves.http_client
import
NO_CONTENT
from
six.moves.http_client
import
NO_CONTENT
...
@@ -66,7 +66,7 @@ class TestDataIngestion(ERP5TypeTestCase):
...
@@ -66,7 +66,7 @@ class TestDataIngestion(ERP5TypeTestCase):
body
=
msgpack
.
packb
([
0
,
data_chunk
],
use_bin_type
=
True
)
body
=
msgpack
.
packb
([
0
,
data_chunk
],
use_bin_type
=
True
)
env
=
{
"CONTENT_TYPE"
:
"application/x-www-form-urlencoded"
}
env
=
{
"CONTENT_TYPE"
:
"application/x-www-form-urlencoded"
}
body
=
str2bytes
(
urllib
.
urlencode
({
"data_chunk"
:
body
}))
body
=
str2bytes
(
urllib
.
parse
.
urlencode
({
"data_chunk"
:
body
}))
if
not
isinstance
(
ingestion_policy
,
str
):
if
not
isinstance
(
ingestion_policy
,
str
):
ingestion_policy
=
ingestion_policy
.
getPath
()
ingestion_policy
=
ingestion_policy
.
getPath
()
...
...
bt5/erp5_wendelin/TestTemplateItem/portal_components/test.erp5.testWendelin.py
View file @
e660251a
...
@@ -30,7 +30,7 @@ import string
...
@@ -30,7 +30,7 @@ import string
import
random
import
random
import
struct
import
struct
import
textwrap
import
textwrap
import
urllib
import
six.moves.urllib
as
urllib
import
uuid
import
uuid
from
zExceptions
import
BadRequest
from
zExceptions
import
BadRequest
...
@@ -100,7 +100,7 @@ class Test(ERP5TypeTestCase):
...
@@ -100,7 +100,7 @@ class Test(ERP5TypeTestCase):
body
=
msgpack
.
packb
([
0
,
real_data
],
use_bin_type
=
True
)
body
=
msgpack
.
packb
([
0
,
real_data
],
use_bin_type
=
True
)
if
old_fluentd
:
if
old_fluentd
:
env
=
{
'CONTENT_TYPE'
:
'application/x-www-form-urlencoded'
}
env
=
{
'CONTENT_TYPE'
:
'application/x-www-form-urlencoded'
}
body
=
urllib
.
urlencode
({
'data_chunk'
:
body
})
body
=
urllib
.
parse
.
urlencode
({
'data_chunk'
:
body
})
else
:
else
:
env
=
{
'CONTENT_TYPE'
:
'application/octet-stream'
}
env
=
{
'CONTENT_TYPE'
:
'application/octet-stream'
}
path
=
ingestion_policy
.
getPath
()
+
'/ingest?reference='
+
reference
path
=
ingestion_policy
.
getPath
()
+
'/ingest?reference='
+
reference
...
...
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