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
Alain Takoudjou
erp5
Commits
e2bd30d2
Commit
e2bd30d2
authored
Jan 15, 2016
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ERP5OOo] ERP5 does not return WWW-Authenticate header anymore
parent
5eba1cb7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
product/ERP5OOo/tests/testIngestion.py
product/ERP5OOo/tests/testIngestion.py
+5
-7
No files found.
product/ERP5OOo/tests/testIngestion.py
View file @
e2bd30d2
...
...
@@ -46,6 +46,7 @@ import urllib
import
urllib2
import
httplib
import
urlparse
import
base64
# test files' home
TEST_FILES_HOME
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'test_document'
)
...
...
@@ -2008,12 +2009,6 @@ return result
url_dict
=
dict
(
protocol
=
url_split
[
0
],
hostname
=
url_split
[
1
])
uri
=
'%(protocol)s://%(hostname)s'
%
url_dict
password_mgr
=
urllib2
.
HTTPPasswordMgrWithDefaultRealm
()
password_mgr
.
add_password
(
realm
=
None
,
uri
=
uri
,
user
=
'ERP5TypeTestCase'
,
passwd
=
''
)
opener
=
urllib2
.
build_opener
(
urllib2
.
HTTPDigestAuthHandler
(
password_mgr
),
urllib2
.
HTTPBasicAuthHandler
(
password_mgr
))
urllib2
.
install_opener
(
opener
)
push_url
=
'%s%s/newContent'
%
(
uri
,
self
.
portal
.
portal_contributions
.
getPath
(),)
request
=
urllib2
.
Request
(
push_url
,
urllib
.
urlencode
(
...
...
@@ -2021,7 +2016,10 @@ return result
'filename'
:
filename
,
'reference'
:
reference
,
'disable_cookie_login__'
:
1
,
}))
}),
headers
=
{
'Authorization'
:
'Basic %s'
%
base64
.
b64encode
(
'ERP5TypeTestCase:'
)
})
# disable_cookie_login__ is required to force zope to raise Unauthorized (401)
# then HTTPDigestAuthHandler can perform HTTP Authentication
response
=
urllib2
.
urlopen
(
request
)
...
...
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