From ddec30905ef59432cf49fc2603472f675f210ea7 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Tue, 10 Dec 2024 12:15:00 -0600 Subject: [PATCH] test: add test for `make_json_safe()` with uuid value whoops, missed that.. --- tests/test_util.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/test_util.py b/tests/test_util.py index d737532..21de3a4 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -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")