mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Refs #23919 -- Removed most of remaining six usage
Thanks Tim Graham for the review.
This commit is contained in:
parent
7b2f2e74ad
commit
2b281cc35e
180 changed files with 421 additions and 559 deletions
|
@ -1,9 +1,10 @@
|
|||
from io import StringIO
|
||||
|
||||
from django.apps import apps
|
||||
from django.core import management
|
||||
from django.db import migrations
|
||||
from django.db.models import signals
|
||||
from django.test import TransactionTestCase, override_settings
|
||||
from django.utils import six
|
||||
|
||||
APP_CONFIG = apps.get_app_config('migrate_signals')
|
||||
SIGNAL_ARGS = ['app_config', 'verbosity', 'interactive', 'using', 'plan', 'apps']
|
||||
|
@ -70,7 +71,7 @@ class MigrateSignalTests(TransactionTestCase):
|
|||
post_migrate_receiver = Receiver(signals.post_migrate)
|
||||
management.call_command(
|
||||
'migrate', database=MIGRATE_DATABASE, verbosity=MIGRATE_VERBOSITY,
|
||||
interactive=MIGRATE_INTERACTIVE, stdout=six.StringIO(),
|
||||
interactive=MIGRATE_INTERACTIVE, stdout=StringIO(),
|
||||
)
|
||||
|
||||
for receiver in [pre_migrate_receiver, post_migrate_receiver]:
|
||||
|
@ -91,7 +92,7 @@ class MigrateSignalTests(TransactionTestCase):
|
|||
"""
|
||||
pre_migrate_receiver = Receiver(signals.pre_migrate)
|
||||
post_migrate_receiver = Receiver(signals.post_migrate)
|
||||
stdout = six.StringIO()
|
||||
stdout = StringIO()
|
||||
management.call_command(
|
||||
'migrate', database=MIGRATE_DATABASE, verbosity=MIGRATE_VERBOSITY,
|
||||
interactive=MIGRATE_INTERACTIVE, stdout=stdout,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue