test: add test for make_json_safe()
with uuid value
whoops, missed that..
This commit is contained in:
parent
40562c126e
commit
ddec30905e
|
@ -1,6 +1,7 @@
|
|||
# -*- coding: utf-8; -*-
|
||||
|
||||
import json
|
||||
import uuid as _uuid
|
||||
from unittest import TestCase
|
||||
from unittest.mock import patch, MagicMock
|
||||
|
||||
|
@ -564,6 +565,11 @@ class TestMakeJsonSafe(TestCase):
|
|||
value = mod.make_json_safe(person, key='person')
|
||||
self.assertEqual(value, "Betty Boop")
|
||||
|
||||
def test_uuid(self):
|
||||
uuid = _uuid.uuid4()
|
||||
value = mod.make_json_safe(uuid)
|
||||
self.assertEqual(value, uuid.hex)
|
||||
|
||||
def test_dict(self):
|
||||
model = self.app.model
|
||||
person = model.Person(full_name="Betty Boop")
|
||||
|
|
Loading…
Reference in a new issue