0001-python3-use-six.StringIO.patch
src/authentic2/management/commands/slapd-shell.py | ||
---|---|---|
1 | 1 |
import logging |
2 | 2 |
import sys |
3 |
from StringIO import StringIO
|
|
3 |
from six import StringIO
|
|
4 | 4 |
import re |
5 | 5 | |
6 | 6 |
from ldap.dn import escape_dn_chars |
src/authentic2/saml/management/commands/sync-metadata.py | ||
---|---|---|
2 | 2 |
import xml.etree.ElementTree as etree |
3 | 3 |
import os |
4 | 4 |
import requests |
5 |
from StringIO import StringIO
|
|
5 |
from six import StringIO
|
|
6 | 6 |
import warnings |
7 | 7 | |
8 | 8 |
from django.core.management.base import BaseCommand, CommandError |
tests/test_idp_saml2.py | ||
---|---|---|
2 | 2 |
import datetime |
3 | 3 |
import base64 |
4 | 4 |
import unittest |
5 |
import StringIO |
|
5 |
from six import StringIO
|
|
6 | 6 |
import urlparse |
7 | 7 |
from lxml.html import parse |
8 | 8 | |
... | ... | |
283 | 283 |
self.assertEqual(response.status_code, 200) |
284 | 284 |
self.assertEqual(response['Content-type'].split(';')[0], |
285 | 285 |
'text/html') |
286 |
doc = parse(StringIO.StringIO(response.content)).getroot()
|
|
286 |
doc = parse(StringIO(response.content)).getroot() |
|
287 | 287 |
self.assertEqual(len(doc.forms), 1, |
288 | 288 |
msg='the number of forms is not 1') |
289 | 289 |
self.assertEqual(doc.forms[0].get('action'), |
... | ... | |
328 | 328 |
response = client.get(response['Location']) |
329 | 329 |
self.assertEqual(response.status_code, 200) |
330 | 330 |
self.assertEqual(response['Content-type'].split(';')[0], 'text/html') |
331 |
doc = parse(StringIO.StringIO(response.content)).getroot()
|
|
331 |
doc = parse(StringIO(response.content)).getroot() |
|
332 | 332 |
self.assertEqual(len(doc.forms), 1, msg='the number of forms is not 1') |
333 | 333 |
self.assertEqual( |
334 | 334 |
doc.forms[0].get('action'), '%s/sso/POST' % self.base_url) |
335 |
- |