mirror of
https://github.com/Hopiu/django-cachalot.git
synced 2026-05-15 16:13:10 +00:00
Fixes the float test on MySQL.
This commit is contained in:
parent
87ed73390f
commit
b7f3c35502
1 changed files with 3 additions and 1 deletions
|
|
@ -735,7 +735,9 @@ class ParameterTypeTestCase(TransactionTestCase):
|
|||
data2 = list(Test.objects.values_list('a_float', flat=True).filter(
|
||||
a_float__isnull=False).order_by('a_float'))
|
||||
self.assertListEqual(data2, data1)
|
||||
self.assertListEqual(data2, [0.123456789, 12345.6789])
|
||||
self.assertEqual(len(data2), 2)
|
||||
self.assertAlmostEqual(data2[0], 0.123456789, delta=0.0001)
|
||||
self.assertAlmostEqual(data2[1], 0.123456789, delta=0.0001)
|
||||
|
||||
with self.assertNumQueries(1):
|
||||
Test.objects.get(a_float=0.123456789)
|
||||
|
|
|
|||
Loading…
Reference in a new issue