summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDavid Sanders <shang.xiao.sanders@gmail.com>2023-05-24 18:59:55 +1000
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2023-05-24 11:00:21 +0200
commit91f8df5c2e711ff4b3d10602181d8a6daa62a93a (patch)
tree97d2db6a4ed429033afb2826fa9a81e2317df1d2 /tests
parenta44e974412e1f1172fd3948cdaf03eb2f79cf693 (diff)
[4.2.x] Fixed #34590 -- Reverted "Refs #33308 -- Improved adapting DecimalField values to decimal."
This reverts 7990d254b0af158baf827fafbd90fe8e890f23bd. Thanks Marc Odermatt for the report. Backport of 0c1518ee429b01c145cf5b34eab01b0b92f8c246 from main
Diffstat (limited to 'tests')
-rw-r--r--tests/model_fields/test_decimalfield.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/model_fields/test_decimalfield.py b/tests/model_fields/test_decimalfield.py
index 88c6878f59..588bb64a3a 100644
--- a/tests/model_fields/test_decimalfield.py
+++ b/tests/model_fields/test_decimalfield.py
@@ -91,7 +91,10 @@ class DecimalFieldTests(TestCase):
Really big values can be used in a filter statement.
"""
# This should not crash.
- Foo.objects.filter(d__gte=100000000000)
+ self.assertSequenceEqual(Foo.objects.filter(d__gte=100000000000), [])
+
+ def test_lookup_decimal_larger_than_max_digits(self):
+ self.assertSequenceEqual(Foo.objects.filter(d__lte=Decimal("123456")), [])
def test_max_digits_validation(self):
field = models.DecimalField(max_digits=2)