mirror of
https://github.com/django/django.git
synced 2025-07-28 23:54:02 +00:00
Refs #33476 -- Reformatted code with Black.
This commit is contained in:
parent
f68fa8b45d
commit
9c19aff7c7
1992 changed files with 139577 additions and 96284 deletions
|
@ -6,12 +6,12 @@ from django.test.utils import modify_settings
|
|||
from . import PostgreSQLTestCase
|
||||
|
||||
|
||||
@modify_settings(INSTALLED_APPS={'append': 'django.contrib.postgres'})
|
||||
@modify_settings(INSTALLED_APPS={"append": "django.contrib.postgres"})
|
||||
class InspectDBTests(PostgreSQLTestCase):
|
||||
def assertFieldsInModel(self, model, field_outputs):
|
||||
out = StringIO()
|
||||
call_command(
|
||||
'inspectdb',
|
||||
"inspectdb",
|
||||
table_name_filter=lambda tn: tn.startswith(model),
|
||||
stdout=out,
|
||||
)
|
||||
|
@ -21,12 +21,12 @@ class InspectDBTests(PostgreSQLTestCase):
|
|||
|
||||
def test_range_fields(self):
|
||||
self.assertFieldsInModel(
|
||||
'postgres_tests_rangesmodel',
|
||||
"postgres_tests_rangesmodel",
|
||||
[
|
||||
'ints = django.contrib.postgres.fields.IntegerRangeField(blank=True, null=True)',
|
||||
'bigints = django.contrib.postgres.fields.BigIntegerRangeField(blank=True, null=True)',
|
||||
'decimals = django.contrib.postgres.fields.DecimalRangeField(blank=True, null=True)',
|
||||
'timestamps = django.contrib.postgres.fields.DateTimeRangeField(blank=True, null=True)',
|
||||
'dates = django.contrib.postgres.fields.DateRangeField(blank=True, null=True)',
|
||||
"ints = django.contrib.postgres.fields.IntegerRangeField(blank=True, null=True)",
|
||||
"bigints = django.contrib.postgres.fields.BigIntegerRangeField(blank=True, null=True)",
|
||||
"decimals = django.contrib.postgres.fields.DecimalRangeField(blank=True, null=True)",
|
||||
"timestamps = django.contrib.postgres.fields.DateTimeRangeField(blank=True, null=True)",
|
||||
"dates = django.contrib.postgres.fields.DateRangeField(blank=True, null=True)",
|
||||
],
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue