We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 01129b8 commit ee84ee7Copy full SHA for ee84ee7
test_project/app/tests.py
@@ -78,9 +78,9 @@ def test_decimal(self):
78
t1 = Test.objects.create(json=1.24)
79
self.assertEqual(Decimal('1.24'), Test.objects.get(pk=t1.pk).json)
80
t2 = Test.objects.create(json=Decimal(1.24))
81
- self.assertEqual(Decimal(1.24), Test.objects.get(pk=t2.pk).json)
+ self.assertEqual(str(Decimal(1.24)), Test.objects.get(pk=t2.pk).json)
82
t3 = Test.objects.create(json={'test':[{'test':Decimal(1.24)}]})
83
- self.assertEqual({'test':[{'test':Decimal(1.24)}]}, Test.objects.get(pk=t3.pk).json)
+ self.assertEqual({'test':[{'test':str(Decimal(1.24))}]}, Test.objects.get(pk=t3.pk).json)
84
85
def test_time(self):
86
now = datetime.datetime.now().time()
0 commit comments