Ticket #30095: regression_30095.py
File regression_30095.py, 492 bytes (added by , 6 years ago) |
---|
Line | |
---|---|
1 | from django.contrib.postgres import fields as pg_fields |
2 | from django.db import models |
3 | |
4 | from . import PostgreSQLTestCase |
5 | |
6 | |
7 | class Test30095(PostgreSQLTestCase): |
8 | |
9 | def test_choices_tuple_range(self): |
10 | class Model(models.Model): |
11 | field = pg_fields.IntegerRangeField( |
12 | choices=( |
13 | ((1, 50), "1-50"), |
14 | ((50, 100), "51-100"), |
15 | ) |
16 | ) |
17 | |
18 | self.assertEqual(Model._meta.get_field('field').check(), []) |