diff --git a/tests/regressiontests/model_fields/models.py b/tests/regressiontests/model_fields/models.py
index 4dcfb17..532cdd5 100644
a
|
b
|
class Whiz(models.Model):
|
47 | 47 | |
48 | 48 | class BigD(models.Model): |
49 | 49 | d = models.DecimalField(max_digits=38, decimal_places=30) |
| 50 | d2 = models.DecimalField(max_digits=200, decimal_places=100, null=True) |
50 | 51 | |
51 | 52 | class BigS(models.Model): |
52 | 53 | s = models.SlugField(max_length=255) |
diff --git a/tests/regressiontests/model_fields/tests.py b/tests/regressiontests/model_fields/tests.py
index 8fe67fb..3c1dee0 100644
a
|
b
|
class DecimalFieldTests(test.TestCase):
|
112 | 112 | # This should not crash. That counts as a win for our purposes. |
113 | 113 | Foo.objects.filter(d__gte=100000000000) |
114 | 114 | |
| 115 | def test_save_large_values(self): |
| 116 | values = ( |
| 117 | "987654321001234.987654321001234", |
| 118 | ) |
| 119 | for v in values: |
| 120 | bd = BigD(d=0, d2=v) |
| 121 | bd.save() |
| 122 | bd = BigD.objects.get(pk=bd.pk) |
| 123 | self.assertEqual(bd.d2, Decimal(v)) |
| 124 | |
115 | 125 | class ForeignKeyTests(test.TestCase): |
116 | 126 | def test_callable_default(self): |
117 | 127 | """Test the use of a lazy callable for ForeignKey.default""" |