Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-openid-auth
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-openid-auth
Commits
c6f73bef
Commit
c6f73bef
authored
Jun 18, 2013
by
Ricardo Kirkner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
a few changes per review
parent
5d57b5db
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
django_openid_auth/tests/test_views.py
+9
-7
No files found.
django_openid_auth/tests/test_views.py
View file @
c6f73bef
...
...
@@ -1171,8 +1171,7 @@ class RelyingPartyTests(TestCase):
useropenid
=
UserOpenID
(
user
=
user
,
claimed_id
=
'http://example.com/identity'
,
display_id
=
'http://example.com/identity'
,
account_verified
=
False
)
display_id
=
'http://example.com/identity'
)
useropenid
.
save
()
# Configure the provider to advertise attribute exchange
...
...
@@ -1251,31 +1250,34 @@ class RelyingPartyTests(TestCase):
user_openid
=
UserOpenID
.
objects
.
get
(
user
=
user
)
self
.
assertEqual
(
user_openid
.
account_verified
,
is_verified
)
def
test_login_attribute_exchange_with_v
alid
ation
(
self
):
def
test_login_attribute_exchange_with_v
erific
ation
(
self
):
settings
.
OPENID_VALID_VERIFICATION_SCHEMES
=
{
self
.
provider
.
endpoint_url
:
(
'token_via_email'
,),
}
self
.
check_login_attribute_exchange
(
'token_via_email'
,
is_verified
=
True
)
def
test_login_attribute_exchange_without_v
alid
ation
(
self
):
def
test_login_attribute_exchange_without_v
erific
ation
(
self
):
settings
.
OPENID_VALID_VERIFICATION_SCHEMES
=
{
self
.
provider
.
endpoint_url
:
(
'token_via_email'
,),
}
self
.
check_login_attribute_exchange
(
None
,
is_verified
=
False
)
def
test_login_attribute_exchange_without_account_verified
(
self
):
# don't request account_verified attribute in AX request
# and check account verification status is left unmodified
# (it's set to False by default for a new user)
self
.
check_login_attribute_exchange
(
None
,
is_verified
=
False
,
request_account_verified
=
False
)
def
test_login_attribute_exchange_unrecognised_v
alid
ation
(
self
):
def
test_login_attribute_exchange_unrecognised_v
erific
ation
(
self
):
settings
.
OPENID_VALID_VERIFICATION_SCHEMES
=
{
self
.
provider
.
endpoint_url
:
(
'token_via_email'
,),
}
self
.
check_login_attribute_exchange
(
'unrecognised_scheme'
,
is_verified
=
False
)
def
test_login_attribute_exchange_different_default_v
alid
ation
(
self
):
def
test_login_attribute_exchange_different_default_v
erific
ation
(
self
):
settings
.
OPENID_VALID_VERIFICATION_SCHEMES
=
{
None
:
(
'token_via_email'
,
'sms'
),
'http://otherprovider/'
:
(
'unrecognised_scheme'
,),
...
...
@@ -1283,7 +1285,7 @@ class RelyingPartyTests(TestCase):
self
.
check_login_attribute_exchange
(
'unrecognised_scheme'
,
is_verified
=
False
)
def
test_login_attribute_exchange_matched_default_v
alid
ation
(
self
):
def
test_login_attribute_exchange_matched_default_v
erific
ation
(
self
):
settings
.
OPENID_VALID_VERIFICATION_SCHEMES
=
{
None
:
(
'token_via_email'
,),
'http://otherprovider/'
:
(
'unrecognised_scheme'
,),
...
...
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