Skip to content

Commit f079301

Browse files
committed
fix: addressed several warnings
1 parent 264883d commit f079301

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

allauth/idp/oidc/forms.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,9 @@ class RPInitiatedLogoutForm(forms.Form):
115115

116116
# OPTIONAL. URI to which the RP is requesting that the End-User's User Agent
117117
# be redirected after a logout has been performed.
118-
post_logout_redirect_uri = forms.URLField(required=False, widget=forms.HiddenInput)
118+
post_logout_redirect_uri = forms.URLField(
119+
assume_scheme="https", required=False, widget=forms.HiddenInput
120+
)
119121

120122
# OPTIONAL. Opaque value used by the RP to maintain state between the logout
121123
# request and the callback to the endpoint specified by the

allauth/socialaccount/providers/openid/forms.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
class LoginForm(forms.Form):
66
openid = forms.URLField(
7+
assume_scheme="https",
78
label=("OpenID"),
89
help_text=mark_safe(
910
'Get an <a href="http://openidexplained.com/get">OpenID</a>'

tests/apps/account/test_email_verification.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
from allauth.account.signals import user_logged_in
2525

2626

27-
class TestEmailVerificationAdapter(DefaultAccountAdapter):
27+
class SignupRedirectEmailVerificationAdapter(DefaultAccountAdapter):
2828
SIGNUP_REDIRECT_URL = "/foobar"
2929

3030
def get_signup_redirect_url(self, request):
@@ -37,9 +37,9 @@ def get_signup_redirect_url(self, request):
3737
(None, "", app_settings.SIGNUP_REDIRECT_URL),
3838
(None, "?next=/foo", "/foo"),
3939
(
40-
"tests.apps.account.test_email_verification.TestEmailVerificationAdapter",
40+
"tests.apps.account.test_email_verification.SignupRedirectEmailVerificationAdapter",
4141
"",
42-
TestEmailVerificationAdapter.SIGNUP_REDIRECT_URL,
42+
SignupRedirectEmailVerificationAdapter.SIGNUP_REDIRECT_URL,
4343
),
4444
],
4545
)

tests/conftest.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -471,13 +471,13 @@ def user_with_phone(user, phone):
471471
return user
472472

473473

474-
def pytest_ignore_collect(path, config):
474+
def pytest_ignore_collect(collection_path, config):
475475
from tests.projects.common.settings import INSTALLED_SOCIALACCOUNT_APPS
476476

477477
if "allauth.socialaccount.providers.saml" not in INSTALLED_SOCIALACCOUNT_APPS:
478478
if (
479479
Path(__file__).parent / "apps" / "socialaccount" / "providers" / "saml"
480-
in Path(path).parents
480+
in collection_path.parents
481481
):
482482
return True
483483

@@ -497,7 +497,10 @@ def pytest_ignore_collect(path, config):
497497
return False
498498
for skipped_path in skipped_paths:
499499
abs_skipped_path = Path(__file__).parent / "apps" / skipped_path
500-
if abs_skipped_path == Path(path) or abs_skipped_path in Path(path).parents:
500+
if (
501+
abs_skipped_path == collection_path
502+
or abs_skipped_path in collection_path.parents
503+
):
501504
return True
502505
return False
503506

0 commit comments

Comments
 (0)