0001-python3-define-a-FileType-in-tests-test_commands.py.patch
src/authentic2/compat.py | ||
---|---|---|
6 | 6 |
from django.db import connection |
7 | 7 |
from django.db.utils import OperationalError |
8 | 8 |
from django.core.exceptions import ImproperlyConfigured |
9 |
from django.utils import six |
|
9 | 10 | |
10 | 11 |
from django.contrib.auth.tokens import PasswordResetTokenGenerator |
11 | 12 |
tests/test_commands.py | ||
---|---|---|
10 | 10 |
from authentic2_auth_oidc.models import OIDCProvider |
11 | 11 |
from django_rbac.utils import get_ou_model |
12 | 12 | |
13 |
if six.PY2: |
|
14 |
FileType = file |
|
15 |
else: |
|
16 |
from io import TextIOWrapper, BufferedReader, BufferedWriter |
|
17 |
FileType = (TextIOWrapper, BufferedReader, BufferedWriter) |
|
18 | ||
13 | 19 | |
14 | 20 |
def test_changepassword(db, simple_user, monkeypatch): |
15 | 21 |
import getpass |
16 |
- |