1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-13 03:09:51 +03:00
aports/community/py3-django-allauth/rollback-c99acb-skip-certain-tests.patch
Antoine Martin 05f22d68a5 community/py3-django-allauth: upgrade to 65.9.0
Adds patch removing new test-unit dependencies to ninja
2025-07-07 22:37:13 +01:00

57 lines
1.6 KiB
Diff

diff --git a/allauth/conftest.py.orig b/allauth/conftest.py
index 00c2b78d8f2..df7dc57330f 100644
--- a/allauth/conftest.py.orig
+++ b/allauth/conftest.py
@@ -1,13 +1,11 @@
import importlib
import json
-import os
import random
import re
import sys
import time
import uuid
from contextlib import contextmanager
-from pathlib import Path
from unittest.mock import Mock, PropertyMock, patch
from django.contrib.auth import get_user_model
@@ -470,38 +468,6 @@ def user_with_phone(user, phone):
get_adapter().set_phone(user, phone, True)
return user
-
-def pytest_ignore_collect(path, config):
- from tests.common.settings import INSTALLED_SOCIALACCOUNT_APPS
-
- if "allauth.socialaccount.providers.saml" not in INSTALLED_SOCIALACCOUNT_APPS:
- if (
- Path(__file__).parent / "socialaccount" / "providers" / "saml"
- in Path(path).parents
- ):
- return True
-
- tests_to_skip = {
- "tests.account_only.settings": (
- "headless",
- "mfa",
- "usersessions",
- "socialaccount",
- "idp",
- ),
- "tests.headless_only.settings": ("idp",),
- }
- dsm = os.getenv("DJANGO_SETTINGS_MODULE")
- skipped_paths = tests_to_skip.get(dsm)
- if not skipped_paths:
- return False
- for skipped_path in skipped_paths:
- abs_skipped_path = Path(__file__).parent / skipped_path
- if abs_skipped_path == Path(path) or abs_skipped_path in Path(path).parents:
- return True
- return False
-
-
@pytest.fixture()
def messagesoutbox():
from tests.common import adapters