Skip to content

Commit

Permalink
tests(openid): Reenable
Browse files Browse the repository at this point in the history
  • Loading branch information
pennersr committed Nov 3, 2023
1 parent a66dbbe commit ef8511b
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions allauth/socialaccount/providers/openid/tests.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from unittest import expectedFailure
from unittest.mock import Mock, patch

from django.contrib.auth import get_user_model
Expand Down Expand Up @@ -26,13 +25,12 @@ def test_discovery_failure(self):
)
self.assertTrue("openid" in resp.context["form"].errors)

@expectedFailure
def test_login(self):
# Location: https://s.yimg.com/wm/mbr/html/openid-eol-0.0.1.html
resp = self.client.post(
reverse(views.login), dict(openid="http://me.yahoo.com")
reverse(views.login), dict(openid="https://steamcommunity.com/openid")
)
assert "login.yahooapis" in resp["location"]
assert "steamcommunity.com/openid/login" in resp["location"]
with patch(
"allauth.socialaccount.providers.openid.views._openid_consumer"
) as consumer_mock:
Expand Down Expand Up @@ -64,7 +62,6 @@ def test_login(self):
)
get_user_model().objects.get(first_name="raymond")

@expectedFailure
@override_settings(
SOCIALACCOUNT_PROVIDERS={
"openid": {
Expand All @@ -88,9 +85,9 @@ def test_login(self):
def test_login_with_extra_attributes(self):
with patch("allauth.socialaccount.providers.openid.views.QUERY_EMAIL", True):
resp = self.client.post(
reverse(views.login), dict(openid="http://me.yahoo.com")
reverse(views.login), dict(openid="https://steamcommunity.com/openid")
)
assert "login.yahooapis" in resp["location"]
assert "steamcommunity.com/openid/login" in resp["location"]
with patch(
"allauth.socialaccount.providers.openid.views._openid_consumer"
) as consumer_mock:
Expand Down

0 comments on commit ef8511b

Please sign in to comment.