1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Refs #24928 -- Added introspection support for PostgreSQL RangeField

This commit is contained in:
Claude Paroz
2017-09-09 18:33:05 +02:00
parent 0cbb6ac007
commit a599ae6018
3 changed files with 19 additions and 2 deletions

View File

@@ -24,3 +24,15 @@ class InspectDBTests(PostgreSQLTestCase):
'postgres_tests_jsonmodel',
['field = django.contrib.postgresql.fields.JSONField(blank=True, null=True)'],
)
def test_range_fields(self):
self.assertFieldsInModel(
'postgres_tests_rangesmodel',
[
'ints = django.contrib.postgresql.fields.IntegerRangeField(blank=True, null=True)',
'bigints = django.contrib.postgresql.fields.BigIntegerRangeField(blank=True, null=True)',
'floats = django.contrib.postgresql.fields.FloatRangeField(blank=True, null=True)',
'timestamps = django.contrib.postgresql.fields.DateTimeRangeField(blank=True, null=True)',
'dates = django.contrib.postgresql.fields.DateRangeField(blank=True, null=True)',
],
)