Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
ai
sso
Commits
9dc1095a
Commit
9dc1095a
authored
Aug 10, 2013
by
ale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove extra base64 encodings from mod_sso integration test
parent
45fd3834
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
src/mod_sso/test/httpd_integration_test.py
src/mod_sso/test/httpd_integration_test.py
+2
-4
No files found.
src/mod_sso/test/httpd_integration_test.py
View file @
9dc1095a
#!/usr/bin/python
#!/usr/bin/python
import
base64
import
httplib
import
httplib
import
os
import
os
import
subprocess
import
subprocess
...
@@ -147,14 +146,13 @@ class HttpdIntegrationTest(unittest.TestCase):
...
@@ -147,14 +146,13 @@ class HttpdIntegrationTest(unittest.TestCase):
# test the /sso_login endpoint
# test the /sso_login endpoint
conn
=
httplib
.
HTTPConnection
(
"127.0.0.1"
,
33000
)
conn
=
httplib
.
HTTPConnection
(
"127.0.0.1"
,
33000
)
tkt
=
self
.
_ticket
()
tkt
=
self
.
_ticket
()
tkt_enc
=
base64
.
b64encode
(
tkt
)
conn
.
request
(
"GET"
,
"/sso_login?%s"
%
urllib
.
urlencode
(
conn
.
request
(
"GET"
,
"/sso_login?%s"
%
urllib
.
urlencode
(
{
"t"
:
tkt
_enc
,
"d"
:
"https://service.example.com/index.html"
}))
{
"t"
:
tkt
,
"d"
:
"https://service.example.com/index.html"
}))
resp
=
conn
.
getresponse
()
resp
=
conn
.
getresponse
()
self
.
assertEquals
(
302
,
resp
.
status
)
self
.
assertEquals
(
302
,
resp
.
status
)
set_cookie
=
resp
.
getheader
(
"Set-Cookie"
)
set_cookie
=
resp
.
getheader
(
"Set-Cookie"
)
self
.
assertTrue
(
set_cookie
)
self
.
assertTrue
(
set_cookie
)
self
.
assertTrue
(
tkt
_enc
in
set_cookie
)
self
.
assertTrue
(
tkt
in
set_cookie
)
conn
.
close
()
conn
.
close
()
# test the /sso_logout endpoint
# test the /sso_logout endpoint
...
...
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