0001-python3-define-a-FileType-in-tests-test_commands.py.patch
tests/test_commands.py | ||
---|---|---|
3 | 3 |
import json |
4 | 4 | |
5 | 5 |
from django.core import management |
6 |
from django.utils import six |
|
6 | 7 |
from django.utils.timezone import now |
7 | 8 |
import py |
8 | 9 | |
... | ... | |
10 | 11 |
from authentic2_auth_oidc.models import OIDCProvider |
11 | 12 |
from django_rbac.utils import get_ou_model |
12 | 13 | |
14 |
if six.PY2: |
|
15 |
FileType = file |
|
16 |
else: |
|
17 |
from io import TextIOWrapper, BufferedReader, BufferedWriter |
|
18 |
FileType = (TextIOWrapper, BufferedReader, BufferedWriter) |
|
19 | ||
13 | 20 | |
14 | 21 |
def test_changepassword(db, simple_user, monkeypatch): |
15 | 22 |
import getpass |
16 |
- |