Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-cas
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
django-cas
Commits
5f46e707
Commit
5f46e707
authored
Nov 29, 2010
by
Ed Crewe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user getpass
parent
535f28d9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
django_cas/tests/cas_tests.py
+5
-5
No files found.
django_cas/tests/cas_tests.py
View file @
5f46e707
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
# You will need to edit the constants below to match your setup ...
# You will need to edit the constants below to match your setup ...
import
sys
import
sys
import
getpass
import
urllib2
import
urllib2
import
urllib
import
urllib
from
urlparse
import
urljoin
from
urlparse
import
urljoin
...
@@ -32,13 +33,12 @@ except:
...
@@ -32,13 +33,12 @@ except:
def
get_auth
():
def
get_auth
():
""" Get authentication by passing to this script on the command line """
""" Get authentication by passing to this script on the command line """
if
len
(
sys
.
argv
)
==
3
:
if
len
(
sys
.
argv
)
>
1
:
AUTH
[
'username'
]
=
sys
.
argv
[
1
]
AUTH
[
'username'
]
=
sys
.
argv
[
1
]
AUTH
[
'password'
]
=
sys
.
argv
[
2
]
return
AUTH
else
:
else
:
print
'You must call the test via:'
AUTH
[
'username'
]
=
getpass
.
getuser
()
print
'python proxy_test.py username password'
AUTH
[
'password'
]
=
getpass
.
getpass
(
'CAS Password for user
%
s:'
%
AUTH
[
'username'
])
return
AUTH
def
get_token
(
opener
,
url
,
token
=
TOKEN
):
def
get_token
(
opener
,
url
,
token
=
TOKEN
):
""" Get CSRF token """
""" Get CSRF token """
...
...
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