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
e233c7fe
Commit
e233c7fe
authored
Sep 28, 2012
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
createERP5User does not use ERP5 so use HTTP Authentication instead.
parent
4bb25df1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
erp5/util/testbrowser/examples/createERP5User.py
erp5/util/testbrowser/examples/createERP5User.py
+5
-2
No files found.
erp5/util/testbrowser/examples/createERP5User.py
View file @
e233c7fe
...
@@ -27,8 +27,6 @@ except ValueError:
...
@@ -27,8 +27,6 @@ except ValueError:
# Create a browser instance
# Create a browser instance
browser
=
Browser
(
url
,
username
,
password
)
browser
=
Browser
(
url
,
username
,
password
)
browser
.
open
()
browser
.
mainForm
.
submitLogin
()
erp5_role_tuple
=
(
'Assignee'
,
erp5_role_tuple
=
(
'Assignee'
,
'Assignor'
,
'Assignor'
,
...
@@ -46,6 +44,11 @@ post_data_format = "submit=Add&roles:list=Manager&roles:list=Owner&name=" \
...
@@ -46,6 +44,11 @@ post_data_format = "submit=Add&roles:list=Manager&roles:list=Owner&name=" \
# TODO: Because of post() not wrapped properly
# TODO: Because of post() not wrapped properly
zope_url
=
url
.
rsplit
(
'/'
,
2
)[
0
]
zope_url
=
url
.
rsplit
(
'/'
,
2
)[
0
]
import
base64
browser
.
mech_browser
.
addheaders
.
append
(
(
'Authorization'
,
'Basic %s'
%
base64
.
encodestring
(
'%s:%s'
%
(
username
,
password
))))
for
index
in
range
(
user_nbr
):
for
index
in
range
(
user_nbr
):
new_username
=
"%s%d"
%
(
new_username_prefix
,
index
)
new_username
=
"%s%d"
%
(
new_username_prefix
,
index
)
...
...
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