mirror of
https://github.com/django/django.git
synced 2025-08-30 07:17:49 +00:00
Fixed #23894 -- Made deconstruct methods favor kwargs over args
This commit is contained in:
parent
e023ceb453
commit
912ad03226
6 changed files with 182 additions and 41 deletions
|
@ -6,7 +6,6 @@ from django.contrib.postgres.forms import SimpleArrayField, SplitArrayField
|
|||
from django.core import exceptions, serializers
|
||||
from django.core.management import call_command
|
||||
from django.db import models, IntegrityError, connection
|
||||
from django.db.migrations.writer import MigrationWriter
|
||||
from django import forms
|
||||
from django.test import TestCase, override_settings
|
||||
from django.utils import timezone
|
||||
|
@ -229,11 +228,6 @@ class TestMigrations(TestCase):
|
|||
new = ArrayField(*args, **kwargs)
|
||||
self.assertEqual(new.base_field.max_length, field.base_field.max_length)
|
||||
|
||||
def test_makemigrations(self):
|
||||
field = ArrayField(models.CharField(max_length=20))
|
||||
statement, imports = MigrationWriter.serialize(field)
|
||||
self.assertEqual(statement, 'django.contrib.postgres.fields.ArrayField(models.CharField(max_length=20), size=None)')
|
||||
|
||||
@override_settings(MIGRATION_MODULES={
|
||||
"postgres_tests": "postgres_tests.array_default_migrations",
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue