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
Paul Graydon
erp5
Commits
6488f71d
Commit
6488f71d
authored
Sep 30, 2022
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
py2/py3: string.letters is locale-dependent and removed in Python 3.
parent
885b3f37
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
7 additions
and
7 deletions
+7
-7
bt5/cloudooo_web/SkinTemplateItem/portal_skins/cloudooo_web/WebSection_generateRandomReference.py
..._skins/cloudooo_web/WebSection_generateRandomReference.py
+1
-1
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Person_generatePassword.py
...ateItem/portal_skins/erp5_base/Person_generatePassword.py
+1
-1
bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/Base_generateSessionID.py
...Item/portal_skins/erp5_commerce/Base_generateSessionID.py
+1
-1
bt5/erp5_commerce/TestTemplateItem/portal_components/test.erp5.testERP5Commerce.py
...plateItem/portal_components/test.erp5.testERP5Commerce.py
+1
-1
bt5/erp5_scalability_test/SkinTemplateItem/portal_skins/erp5_scalability_test/ERP5Site_bootstrapScalabilityTest.py
...rp5_scalability_test/ERP5Site_bootstrapScalabilityTest.py
+1
-1
bt5/erp5_secure_payment/SkinTemplateItem/portal_skins/erp5_secure_payment/Base_generateSessionID.py
...ortal_skins/erp5_secure_payment/Base_generateSessionID.py
+1
-1
product/ERP5Type/tests/ERP5TypeTestCase.py
product/ERP5Type/tests/ERP5TypeTestCase.py
+1
-1
No files found.
bt5/cloudooo_web/SkinTemplateItem/portal_skins/cloudooo_web/WebSection_generateRandomReference.py
View file @
6488f71d
...
@@ -6,4 +6,4 @@ import string
...
@@ -6,4 +6,4 @@ import string
import
random
import
random
return
str
(
DateTime
().
millis
())
+
'-'
+
''
.
join
(
random
.
sample
(
string
.
letters
+
string
.
digits
,
random
.
randint
(
min_len
,
max_len
)))
return
str
(
DateTime
().
millis
())
+
'-'
+
''
.
join
(
random
.
sample
(
string
.
ascii_
letters
+
string
.
digits
,
random
.
randint
(
min_len
,
max_len
)))
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Person_generatePassword.py
View file @
6488f71d
return
''
.
join
(
random
.
SystemRandom
().
sample
(
string
.
letters
+
string
.
digits
,
length
))
return
''
.
join
(
random
.
SystemRandom
().
sample
(
string
.
ascii_
letters
+
string
.
digits
,
length
))
bt5/erp5_commerce/SkinTemplateItem/portal_skins/erp5_commerce/Base_generateSessionID.py
View file @
6488f71d
...
@@ -3,4 +3,4 @@
...
@@ -3,4 +3,4 @@
"""
"""
from
random
import
choice
from
random
import
choice
import
string
import
string
return
''
.
join
([
choice
(
string
.
letters
)
for
i
in
range
(
max_long
)])
return
''
.
join
([
choice
(
string
.
ascii_
letters
)
for
i
in
range
(
max_long
)])
bt5/erp5_commerce/TestTemplateItem/portal_components/test.erp5.testERP5Commerce.py
View file @
6488f71d
...
@@ -536,7 +536,7 @@ class TestCommerce(ERP5TypeTestCase):
...
@@ -536,7 +536,7 @@ class TestCommerce(ERP5TypeTestCase):
id_string
=
self
.
getPortal
().
Base_generateSessionID
()
id_string
=
self
.
getPortal
().
Base_generateSessionID
()
self
.
assertEqual
(
10
,
len
(
id_string
))
self
.
assertEqual
(
10
,
len
(
id_string
))
for
caracter
in
id_string
:
for
caracter
in
id_string
:
self
.
assertTrue
(
caracter
in
string
.
letters
)
self
.
assertTrue
(
caracter
in
string
.
ascii_
letters
)
id_string
=
self
.
getPortal
().
Base_generateSessionID
(
max_long
=
20
)
id_string
=
self
.
getPortal
().
Base_generateSessionID
(
max_long
=
20
)
self
.
assertEqual
(
20
,
len
(
id_string
))
self
.
assertEqual
(
20
,
len
(
id_string
))
...
...
bt5/erp5_scalability_test/SkinTemplateItem/portal_skins/erp5_scalability_test/ERP5Site_bootstrapScalabilityTest.py
View file @
6488f71d
...
@@ -18,7 +18,7 @@ if user_quantity is None:
...
@@ -18,7 +18,7 @@ if user_quantity is None:
"error_message"
:
"Parameter 'user_quantity' is required."
,
"error_message"
:
"Parameter 'user_quantity' is required."
,
"password"
:
None
})
"password"
:
None
})
password
=
''
.
join
(
random
.
choice
(
string
.
digits
+
string
.
letters
)
for
i
in
xrange
(
10
))
password
=
''
.
join
(
random
.
choice
(
string
.
digits
+
string
.
ascii_
letters
)
for
i
in
xrange
(
10
))
# check erp5_scalability_test business template is present
# check erp5_scalability_test business template is present
configurator
=
portal
.
business_configuration_module
.
default_standard_configuration
configurator
=
portal
.
business_configuration_module
.
default_standard_configuration
...
...
bt5/erp5_secure_payment/SkinTemplateItem/portal_skins/erp5_secure_payment/Base_generateSessionID.py
View file @
6488f71d
...
@@ -3,4 +3,4 @@
...
@@ -3,4 +3,4 @@
"""
"""
from
random
import
choice
from
random
import
choice
import
string
import
string
return
''
.
join
([
choice
(
string
.
letters
)
for
i
in
range
(
max_long
)])
return
''
.
join
([
choice
(
string
.
ascii_
letters
)
for
i
in
range
(
max_long
)])
product/ERP5Type/tests/ERP5TypeTestCase.py
View file @
6488f71d
...
@@ -248,7 +248,7 @@ class ERP5TypeTestCaseMixin(ProcessingNodeTestCase, PortalTestCase):
...
@@ -248,7 +248,7 @@ class ERP5TypeTestCaseMixin(ProcessingNodeTestCase, PortalTestCase):
def
newPassword
(
self
):
def
newPassword
(
self
):
""" Generate a password """
""" Generate a password """
return
''
.
join
(
random
.
SystemRandom
().
sample
(
string
.
letters
+
string
.
digits
,
20
))
return
''
.
join
(
random
.
SystemRandom
().
sample
(
string
.
ascii_
letters
+
string
.
digits
,
20
))
def
login
(
self
,
user_name
=
'ERP5TypeTestCase'
,
quiet
=
0
):
def
login
(
self
,
user_name
=
'ERP5TypeTestCase'
,
quiet
=
0
):
"""
"""
...
...
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