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
141
Merge Requests
141
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
d5da11d6
Commit
d5da11d6
authored
Mar 15, 2023
by
Jérome Perrin
Committed by
Kazuhiko Shiozaki
Mar 17, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
web_shadir: PY3 compatibility
parent
8c9b3b73
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
bt5/erp5_web_shadir/TestTemplateItem/portal_components/test.erp5.ShaDirMixin.py
...stTemplateItem/portal_components/test.erp5.ShaDirMixin.py
+3
-3
No files found.
bt5/erp5_web_shadir/TestTemplateItem/portal_components/test.erp5.ShaDirMixin.py
View file @
d5da11d6
...
@@ -47,7 +47,7 @@ class ShaDirMixin(object):
...
@@ -47,7 +47,7 @@ class ShaDirMixin(object):
self
.
portal
=
self
.
getPortal
()
self
.
portal
=
self
.
getPortal
()
self
.
key
=
'mykey'
+
str
(
random
.
random
())
self
.
key
=
'mykey'
+
str
(
random
.
random
())
self
.
file_content
=
'This is the content.'
self
.
file_content
=
b
'This is the content.'
self
.
file_sha512sum
=
hashlib
.
sha512
(
self
.
file_content
).
hexdigest
()
self
.
file_sha512sum
=
hashlib
.
sha512
(
self
.
file_content
).
hexdigest
()
self
.
distribution
=
'pypi'
self
.
distribution
=
'pypi'
self
.
creation_date
=
DateTime
()
self
.
creation_date
=
DateTime
()
...
@@ -62,14 +62,14 @@ class ShaDirMixin(object):
...
@@ -62,14 +62,14 @@ class ShaDirMixin(object):
'expiration_date'
:
str
(
self
.
expiration_date
),
'expiration_date'
:
str
(
self
.
expiration_date
),
'distribution'
:
self
.
distribution
,
'distribution'
:
self
.
distribution
,
'architecture'
:
self
.
architecture
}),
'architecture'
:
self
.
architecture
}),
b64encode
(
"User SIGNATURE goes here."
)]
b64encode
(
b"User SIGNATURE goes here."
).
decode
(
)]
self
.
data
=
json
.
dumps
(
self
.
data_list
)
self
.
data
=
json
.
dumps
(
self
.
data_list
)
self
.
sha512sum
=
hashlib
.
sha512
(
self
.
data
).
hexdigest
()
self
.
sha512sum
=
hashlib
.
sha512
(
self
.
data
).
hexdigest
()
self
.
header_dict
=
{
self
.
header_dict
=
{
'Content-Type'
:
'application/json'
,
'Content-Type'
:
'application/json'
,
'Authorization'
:
'Basic '
+
b64encode
(
'ERP5TypeTestCase:'
),
'Authorization'
:
'Basic '
+
b64encode
(
b'ERP5TypeTestCase:'
).
decode
(
),
}
}
module
=
self
.
portal
.
web_site_module
module
=
self
.
portal
.
web_site_module
...
...
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