Skip to content

Commit ee84ee7

Browse files
Fixed tests to better reflect the encode/decode process
1 parent 01129b8 commit ee84ee7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test_project/app/tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ def test_decimal(self):
7878
t1 = Test.objects.create(json=1.24)
7979
self.assertEqual(Decimal('1.24'), Test.objects.get(pk=t1.pk).json)
8080
t2 = Test.objects.create(json=Decimal(1.24))
81-
self.assertEqual(Decimal(1.24), Test.objects.get(pk=t2.pk).json)
81+
self.assertEqual(str(Decimal(1.24)), Test.objects.get(pk=t2.pk).json)
8282
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)
83+
self.assertEqual({'test':[{'test':str(Decimal(1.24))}]}, Test.objects.get(pk=t3.pk).json)
8484

8585
def test_time(self):
8686
now = datetime.datetime.now().time()

0 commit comments

Comments
 (0)