Removed further six usage: six.string_types, six.integer_types, six.moves.urllib instances.
- Legacy-Id: 17390
This commit is contained in:
parent
1c808bf63b
commit
ab173cb2eb
|
@ -1,4 +1,4 @@
|
|||
# Copyright The IETF Trust 2014-2019, All Rights Reserved
|
||||
# Copyright The IETF Trust 2014-2020, All Rights Reserved
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
|
||||
|
@ -6,9 +6,8 @@ from __future__ import absolute_import, print_function, unicode_literals
|
|||
|
||||
import datetime
|
||||
import re
|
||||
import six
|
||||
|
||||
from six.moves.urllib.parse import urlencode
|
||||
from urllib.parse import urlencode
|
||||
|
||||
from django.conf import settings
|
||||
from django.core.exceptions import ObjectDoesNotExist
|
||||
|
@ -82,7 +81,7 @@ class TimedeltaField(ApiField):
|
|||
if value is None:
|
||||
return None
|
||||
|
||||
if isinstance(value, six.string_types):
|
||||
if isinstance(value, str):
|
||||
match = TIMEDELTA_REGEX.search(value)
|
||||
|
||||
if match:
|
||||
|
@ -97,7 +96,7 @@ class TimedeltaField(ApiField):
|
|||
value = super(TimedeltaField, self).hydrate(bundle)
|
||||
|
||||
if value and not hasattr(value, 'seconds'):
|
||||
if isinstance(value, six.string_types):
|
||||
if isinstance(value, str):
|
||||
try:
|
||||
match = TIMEDELTA_REGEX.search(value)
|
||||
|
||||
|
@ -125,7 +124,7 @@ class ToOneField(tastypie.fields.ToOneField):
|
|||
if callable(self.attribute):
|
||||
previous_obj = bundle.obj
|
||||
foreign_obj = self.attribute(bundle)
|
||||
elif isinstance(self.attribute, six.string_types):
|
||||
elif isinstance(self.attribute, str):
|
||||
foreign_obj = bundle.obj
|
||||
|
||||
for attr in self._attrs:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright The IETF Trust 2010-2019, All Rights Reserved
|
||||
# Copyright The IETF Trust 2010-2020, All Rights Reserved
|
||||
# -*- coding: utf-8 -*-
|
||||
# expiry of Internet Drafts
|
||||
|
||||
|
@ -8,9 +8,8 @@ from __future__ import absolute_import, print_function, unicode_literals
|
|||
from django.conf import settings
|
||||
|
||||
import datetime, os, shutil, glob, re
|
||||
import six
|
||||
from pathlib import Path
|
||||
if six.PY3:
|
||||
|
||||
from typing import List, Tuple # pyflakes:ignore
|
||||
|
||||
from ietf.utils import log
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright The IETF Trust 2016-2019, All Rights Reserved
|
||||
# Copyright The IETF Trust 2016-2020, All Rights Reserved
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
|
||||
|
@ -8,8 +8,7 @@ import debug # pyflakes:ignore
|
|||
import factory
|
||||
import factory.fuzzy
|
||||
import datetime
|
||||
import six
|
||||
if six.PY3:
|
||||
|
||||
from typing import Optional # pyflakes:ignore
|
||||
|
||||
from django.conf import settings
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
from __future__ import absolute_import, print_function, unicode_literals
|
||||
|
||||
import json
|
||||
import six
|
||||
|
||||
from django.utils.html import escape
|
||||
from django import forms
|
||||
|
@ -57,9 +56,9 @@ class SearchableDocumentsField(forms.CharField):
|
|||
def prepare_value(self, value):
|
||||
if not value:
|
||||
value = ""
|
||||
if isinstance(value, six.integer_types):
|
||||
if isinstance(value, int):
|
||||
value = str(value)
|
||||
if isinstance(value, six.string_types):
|
||||
if isinstance(value, str):
|
||||
items = self.parse_select2_value(value)
|
||||
# accept both names and pks here
|
||||
names = [ i for i in items if not i.isdigit() ]
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
# Copyright The IETF Trust 2019, All Rights Reserved
|
||||
# Copyright The IETF Trust 2019-2020, All Rights Reserved
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.20 on 2019-05-08 14:04
|
||||
|
||||
|
||||
from __future__ import absolute_import, print_function, unicode_literals
|
||||
|
||||
import six
|
||||
|
||||
import sys
|
||||
|
||||
from tqdm import tqdm
|
||||
|
@ -18,7 +18,7 @@ def forward(apps, schema_editor):
|
|||
n = getattr(o, a+'_id')
|
||||
if n:
|
||||
i = nameid[n]
|
||||
if not isinstance(i, six.integer_types):
|
||||
if not isinstance(i, int):
|
||||
raise ValueError("Inappropriate value: %s: nameid[%s]: %s" % (o.__class__.__name__, n, i))
|
||||
if getattr(o, a+'2_id') != i:
|
||||
setattr(o, a+'2_id', i)
|
||||
|
|
|
@ -7,7 +7,6 @@ import logging
|
|||
import io
|
||||
import os
|
||||
import rfc2html
|
||||
import six
|
||||
|
||||
from django.db import models
|
||||
from django.core import checks
|
||||
|
@ -412,7 +411,7 @@ class DocumentInfo(models.Model):
|
|||
|
||||
def relations_that(self, relationship):
|
||||
"""Return the related-document objects that describe a given relationship targeting self."""
|
||||
if isinstance(relationship, six.string_types):
|
||||
if isinstance(relationship, str):
|
||||
relationship = ( relationship, )
|
||||
if not isinstance(relationship, tuple):
|
||||
raise TypeError("Expected a string or tuple, received %s" % type(relationship))
|
||||
|
@ -435,7 +434,7 @@ class DocumentInfo(models.Model):
|
|||
|
||||
def relations_that_doc(self, relationship):
|
||||
"""Return the related-document objects that describe a given relationship from self to other documents."""
|
||||
if isinstance(relationship, six.string_types):
|
||||
if isinstance(relationship, str):
|
||||
relationship = ( relationship, )
|
||||
if not isinstance(relationship, tuple):
|
||||
raise TypeError("Expected a string or tuple, received %s" % type(relationship))
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright The IETF Trust 2012-2019, All Rights Reserved
|
||||
# Copyright The IETF Trust 2012-2020, All Rights Reserved
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
|
||||
|
@ -19,7 +19,7 @@ else:
|
|||
|
||||
from six.moves.http_cookies import SimpleCookie
|
||||
from pyquery import PyQuery
|
||||
from six.moves.urllib.parse import urlparse, parse_qs
|
||||
from urllib.parse import urlparse, parse_qs
|
||||
from tempfile import NamedTemporaryFile
|
||||
|
||||
from django.urls import reverse as urlreverse
|
||||
|
|
|
@ -11,10 +11,9 @@ import json
|
|||
import math
|
||||
import os
|
||||
import re
|
||||
import six
|
||||
|
||||
from collections import defaultdict
|
||||
from six.moves.urllib.parse import quote
|
||||
from urllib.parse import quote
|
||||
|
||||
from django.conf import settings
|
||||
from django.contrib import messages
|
||||
|
@ -705,7 +704,7 @@ def get_initial_notify(doc,extra=None):
|
|||
receivers = []
|
||||
|
||||
if extra:
|
||||
if isinstance(extra, six.string_types):
|
||||
if isinstance(extra, str):
|
||||
extra = extra.split(', ')
|
||||
receivers.extend(extra)
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ import json
|
|||
import os
|
||||
import re
|
||||
|
||||
from six.moves.urllib.parse import quote
|
||||
from urllib.parse import quote
|
||||
|
||||
from django.http import HttpResponse, Http404 , HttpResponseForbidden
|
||||
from django.shortcuts import render, get_object_or_404, redirect
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright The IETF Trust 2012-2019, All Rights Reserved
|
||||
# Copyright The IETF Trust 2012-2020, All Rights Reserved
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
|
||||
|
@ -8,8 +8,7 @@ import datetime
|
|||
import io
|
||||
import os
|
||||
import re
|
||||
import six
|
||||
if six.PY3:
|
||||
|
||||
from typing import Dict # pyflakes:ignore
|
||||
|
||||
from django import forms
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
from __future__ import absolute_import, print_function, unicode_literals
|
||||
|
||||
import json
|
||||
import six
|
||||
|
||||
from django.utils.html import escape
|
||||
from django import forms
|
||||
|
@ -54,7 +53,7 @@ class SearchableIprDisclosuresField(forms.CharField):
|
|||
def prepare_value(self, value):
|
||||
if not value:
|
||||
value = ""
|
||||
if isinstance(value, six.string_types):
|
||||
if isinstance(value, str):
|
||||
pks = self.parse_select2_value(value)
|
||||
# if the user posted a non integer value we need to remove it
|
||||
for key in pks:
|
||||
|
|
|
@ -8,7 +8,7 @@ import datetime
|
|||
|
||||
|
||||
from pyquery import PyQuery
|
||||
from six.moves.urllib.parse import quote
|
||||
from urllib.parse import quote
|
||||
|
||||
from django.urls import reverse as urlreverse
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
from __future__ import absolute_import, print_function, unicode_literals
|
||||
|
||||
import json
|
||||
import six
|
||||
|
||||
from django.utils.html import escape
|
||||
from django import forms
|
||||
|
@ -51,9 +50,9 @@ class SearchableLiaisonStatementsField(forms.CharField):
|
|||
def prepare_value(self, value):
|
||||
if not value:
|
||||
value = ""
|
||||
if isinstance(value, six.integer_types):
|
||||
if isinstance(value, int):
|
||||
value = str(value)
|
||||
if isinstance(value, six.string_types):
|
||||
if isinstance(value, str):
|
||||
pks = self.parse_select2_value(value)
|
||||
value = self.model.objects.filter(pk__in=pks)
|
||||
if isinstance(value, LiaisonStatement):
|
||||
|
|
|
@ -10,7 +10,7 @@ import random
|
|||
import shutil
|
||||
|
||||
from pyquery import PyQuery
|
||||
from six.moves.urllib.parse import urlparse
|
||||
from urllib.parse import urlparse
|
||||
|
||||
from django.db import IntegrityError
|
||||
from django.db.models import Max
|
||||
|
|
|
@ -5,10 +5,9 @@
|
|||
from __future__ import absolute_import, print_function, unicode_literals
|
||||
|
||||
import json
|
||||
import six
|
||||
|
||||
from collections import Counter
|
||||
from six.moves.urllib.parse import urlencode
|
||||
from urllib.parse import urlencode
|
||||
|
||||
from django import forms
|
||||
from django.core.validators import validate_email
|
||||
|
@ -90,7 +89,7 @@ class SearchablePersonsField(forms.CharField):
|
|||
def prepare_value(self, value):
|
||||
if not value:
|
||||
value = ""
|
||||
if isinstance(value, six.string_types):
|
||||
if isinstance(value, str):
|
||||
pks = self.parse_select2_value(value)
|
||||
if self.model == Person:
|
||||
value = self.model.objects.filter(pk__in=pks)
|
||||
|
|
|
@ -11,7 +11,7 @@ import six
|
|||
import uuid
|
||||
|
||||
from hashids import Hashids
|
||||
from six.moves.urllib.parse import urljoin
|
||||
from urllib.parse import urljoin
|
||||
|
||||
from django.conf import settings
|
||||
from django.contrib.auth.models import User
|
||||
|
@ -108,7 +108,7 @@ class Person(models.Model):
|
|||
may be an object or the group acronym."""
|
||||
if group:
|
||||
from ietf.group.models import Group
|
||||
if isinstance(group, six.string_types):
|
||||
if isinstance(group, str):
|
||||
group = Group.objects.get(acronym=group)
|
||||
e = Email.objects.filter(person=self, role__group=group, role__name=role_name)
|
||||
else:
|
||||
|
|
|
@ -17,7 +17,7 @@ import hashlib
|
|||
import base64
|
||||
import email.utils
|
||||
|
||||
from six.moves.urllib.parse import urlencode
|
||||
from urllib.parse import urlencode
|
||||
from urllib.request import urlopen
|
||||
|
||||
import debug # pyflakes:ignore
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright The IETF Trust 2013-2019, All Rights Reserved
|
||||
# Copyright The IETF Trust 2013-2020, All Rights Reserved
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
|
||||
|
@ -13,7 +13,7 @@ import datetime
|
|||
import os
|
||||
import re
|
||||
import subprocess
|
||||
from six.moves.urllib.parse import urlencode
|
||||
from urllib.parse import urlencode
|
||||
|
||||
import debug # pyflakes:ignore
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import datetime
|
|||
import re
|
||||
|
||||
from urllib.request import Request, urlopen
|
||||
from six.moves.urllib.parse import urlencode
|
||||
from urllib.parse import urlencode
|
||||
from xml.dom import pulldom, Node
|
||||
|
||||
from django.conf import settings
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
# Copyright The IETF Trust 2012-2019, All Rights Reserved
|
||||
# Copyright The IETF Trust 2012-2020, All Rights Reserved
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
|
||||
from __future__ import absolute_import, print_function, unicode_literals
|
||||
|
||||
import datetime
|
||||
import six
|
||||
import re
|
||||
|
||||
import debug # pyflakes:ignore
|
||||
|
@ -23,7 +22,7 @@ class MultiEmailField(forms.Field):
|
|||
if not value:
|
||||
return []
|
||||
|
||||
if isinstance(value, six.string_types):
|
||||
if isinstance(value, str):
|
||||
values = value.split(',')
|
||||
return [ x.strip() for x in values if x.strip() ]
|
||||
else:
|
||||
|
|
|
@ -8,9 +8,8 @@ import sys
|
|||
import logging
|
||||
import inspect
|
||||
import os.path
|
||||
import six
|
||||
import traceback
|
||||
if six.PY3:
|
||||
|
||||
from typing import Callable # pyflakes:ignore
|
||||
|
||||
try:
|
||||
|
|
|
@ -8,7 +8,6 @@ import copy
|
|||
import datetime
|
||||
#import logging
|
||||
import re
|
||||
import six
|
||||
import smtplib
|
||||
import sys
|
||||
import textwrap
|
||||
|
@ -38,7 +37,6 @@ import ietf
|
|||
from ietf.utils.log import log, assertion
|
||||
from ietf.utils.text import isascii
|
||||
|
||||
if six.PY3:
|
||||
from typing import Any, Dict, List # pyflakes:ignore
|
||||
|
||||
# Testing mode:
|
||||
|
@ -228,12 +226,6 @@ def formataddr(addrtuple):
|
|||
address field. Does what's needed, and returns a string value suitable for
|
||||
use in a To: or Cc: email header field.
|
||||
"""
|
||||
if six.PY2:
|
||||
name, addr = addrtuple
|
||||
if name and not isascii(name):
|
||||
name = str(Header(name, 'utf-8'))
|
||||
return simple_formataddr((name, addr))
|
||||
else:
|
||||
return simple_formataddr(addrtuple)
|
||||
|
||||
def parseaddr(addr):
|
||||
|
@ -245,7 +237,7 @@ def parseaddr(addr):
|
|||
|
||||
"""
|
||||
|
||||
addr = ''.join( [ ( s.decode(m) if m else s.decode()) if isinstance(s, six.binary_type) else s for (s,m) in decode_header(addr) ] )
|
||||
addr = ''.join( [ ( s.decode(m) if m else s.decode()) if isinstance(s, bytes) else s for (s,m) in decode_header(addr) ] )
|
||||
name, addr = simple_parseaddr(addr)
|
||||
return name, addr
|
||||
|
||||
|
@ -477,7 +469,7 @@ def send_mail_preformatted(request, preformatted, extra={}, override={}):
|
|||
def send_mail_message(request, message, extra={}):
|
||||
"""Send a Message object."""
|
||||
# note that this doesn't handle MIME messages at the moment
|
||||
assertion('isinstance(message.to, six.string_types) and isinstance(message.cc, six.string_types) and isinstance(message.bcc, six.string_types)')
|
||||
assertion('isinstance(message.to, str) and isinstance(message.cc, str) and isinstance(message.bcc, str)')
|
||||
|
||||
e = extra.copy()
|
||||
if message.reply_to:
|
||||
|
@ -627,8 +619,5 @@ def get_email_addresses_from_text(text):
|
|||
|
||||
|
||||
def get_payload(msg, decode=False):
|
||||
if six.PY2:
|
||||
return msg.get_payload(decode=decode).decode(msg.get_content_charset('utf-8'))
|
||||
else:
|
||||
return msg.get_payload(decode=decode)
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright The IETF Trust 2015-2019, All Rights Reserved
|
||||
# Copyright The IETF Trust 2015-2020, All Rights Reserved
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
|
||||
|
@ -8,7 +8,6 @@ import gzip
|
|||
import io
|
||||
import json
|
||||
import os
|
||||
import six
|
||||
|
||||
from difflib import ndiff
|
||||
|
||||
|
@ -61,7 +60,7 @@ class Command(BaseCommand):
|
|||
valid_sections = ['template', 'url', 'code']
|
||||
|
||||
def read_coverage(self, filename, version=None):
|
||||
if isinstance(filename, six.string_types):
|
||||
if isinstance(filename, str):
|
||||
try:
|
||||
if filename.endswith(".gz"):
|
||||
file = gzip.open(filename, "rb")
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright The IETF Trust 2016-2019, All Rights Reserved
|
||||
# Copyright The IETF Trust 2016-2020, All Rights Reserved
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
|
||||
|
@ -8,7 +8,6 @@ import os
|
|||
import copy
|
||||
import io
|
||||
import pkg_resources
|
||||
import six
|
||||
import syslog
|
||||
|
||||
from trac.core import TracError
|
||||
|
@ -334,7 +333,7 @@ class Command(BaseCommand):
|
|||
if not self.group_list is None:
|
||||
self.group_list = self.group_list.split('.')
|
||||
|
||||
if isinstance(self.verbosity, six.string_types) and self.verbosity.isdigit():
|
||||
if isinstance(self.verbosity, str) and self.verbosity.isdigit():
|
||||
self.verbosity = int(self.verbosity)
|
||||
|
||||
if self.dummy_run and self.verbosity < 2:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright The IETF Trust 2013-2019, All Rights Reserved
|
||||
# Copyright The IETF Trust 2013-2020, All Rights Reserved
|
||||
# -*- coding: utf-8 -*-
|
||||
# From https://github.com/ericholscher/django-test-utils/blob/master/test_utils/management/commands/makefixture.py
|
||||
|
||||
|
@ -45,8 +45,6 @@ python manage.py makefixture --format=xml --indent=4 YourModel[3] AnotherModel a
|
|||
#no support for generic relations
|
||||
#no support for one-to-one relations
|
||||
|
||||
import six
|
||||
|
||||
from django.core import serializers
|
||||
from django.core.management.base import CommandError
|
||||
from django.core.management.base import LabelCommand
|
||||
|
@ -110,7 +108,7 @@ class Command(LabelCommand):
|
|||
|
||||
objects = []
|
||||
for model, slice in models:
|
||||
if isinstance(slice, six.string_types) and slice:
|
||||
if isinstance(slice, str) and slice:
|
||||
objects.extend(model._default_manager.filter(pk__exact=slice))
|
||||
elif not slice or type(slice) is list:
|
||||
items = model._default_manager.all()
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
# Copyright The IETF Trust 2016-2019, All Rights Reserved
|
||||
# Copyright The IETF Trust 2016-2020, All Rights Reserved
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
|
||||
from __future__ import absolute_import, print_function, unicode_literals
|
||||
|
||||
import io
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
|
||||
from pathlib2 import Path
|
||||
from six import StringIO
|
||||
from textwrap import dedent
|
||||
from xym import xym
|
||||
|
||||
|
@ -66,8 +66,8 @@ class Command(BaseCommand):
|
|||
def extract_from(file, dir, strict=True):
|
||||
saved_stdout = sys.stdout
|
||||
saved_stderr = sys.stderr
|
||||
xymerr = StringIO()
|
||||
xymout = StringIO()
|
||||
xymerr = io.StringIO()
|
||||
xymout = io.StringIO()
|
||||
sys.stderr = xymerr
|
||||
sys.stdout = xymout
|
||||
model_list = []
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright The IETF Trust 2015-2019, All Rights Reserved
|
||||
# Copyright The IETF Trust 2015-2020, All Rights Reserved
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
|
||||
|
@ -6,7 +6,6 @@ from __future__ import absolute_import, print_function, unicode_literals
|
|||
|
||||
import io
|
||||
import os
|
||||
import six
|
||||
import tempfile
|
||||
|
||||
from django.core.management import call_command
|
||||
|
@ -90,7 +89,7 @@ class CoverageChangeTestCase(TestCase):
|
|||
lfh, latest = tempfile.mkstemp(suffix='.json')
|
||||
with io.open(latest, "w") as file:
|
||||
file.write(latest_txt)
|
||||
output = six.StringIO()
|
||||
output = io.StringIO()
|
||||
call_command('coverage_changes', master, latest, stdout=output)
|
||||
text = output.getvalue()
|
||||
os.unlink(master)
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
# Copyright The IETF Trust 2018-2019, All Rights Reserved
|
||||
# Copyright The IETF Trust 2018-2020, All Rights Reserved
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.10 on 2018-02-20 10:52
|
||||
|
||||
|
||||
from __future__ import absolute_import, print_function, unicode_literals
|
||||
|
||||
import six
|
||||
if six.PY3:
|
||||
from typing import List, Tuple # pyflakes:ignore
|
||||
|
||||
from django.db import migrations, models
|
||||
|
|
|
@ -42,7 +42,7 @@ import email
|
|||
import html5lib
|
||||
import sys
|
||||
|
||||
from six.moves.urllib.parse import unquote
|
||||
from urllib.parse import unquote
|
||||
|
||||
from unittest.util import strclass
|
||||
from bs4 import BeautifulSoup
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright The IETF Trust 2014-2019, All Rights Reserved
|
||||
# Copyright The IETF Trust 2014-2020, All Rights Reserved
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
|
||||
|
@ -7,9 +7,9 @@ from __future__ import absolute_import, print_function, unicode_literals
|
|||
import io
|
||||
import os.path
|
||||
import shutil
|
||||
import six
|
||||
import sys
|
||||
import types
|
||||
if six.PY3:
|
||||
|
||||
from typing import Dict, List # pyflakes:ignore
|
||||
|
||||
from email.mime.image import MIMEImage
|
||||
|
@ -282,7 +282,7 @@ class TemplateChecksTestCase(TestCase):
|
|||
r = self.client.get(url)
|
||||
self.assertTemplateUsed(r, '500.html')
|
||||
|
||||
@skipIf(six.PY3, "Trac not available for Python3 as of 14 Jul 2019")
|
||||
@skipIf(sys.version_info.major==3, "Trac not available for Python3 as of 14 Jul 2019")
|
||||
@skipIf(skip_wiki_glue_testing, skip_message)
|
||||
class TestWikiGlueManagementCommand(TestCase):
|
||||
|
||||
|
@ -311,8 +311,8 @@ class TestWikiGlueManagementCommand(TestCase):
|
|||
type__slug__in=['wg','rg','ag','area'],
|
||||
state__slug='active'
|
||||
).order_by('acronym')
|
||||
out = six.StringIO()
|
||||
err = six.StringIO()
|
||||
out = io.StringIO()
|
||||
err = io.StringIO()
|
||||
call_command('create_group_wikis', stdout=out, stderr=err, verbosity=2,
|
||||
wiki_dir_pattern=self.wiki_dir_pattern,
|
||||
svn_dir_pattern=self.svn_dir_pattern,
|
||||
|
|
Loading…
Reference in a new issue