From aba3a377a899b2dfc62e209c9ff3377a0ab1805a Mon Sep 17 00:00:00 2001 From: Mike Dirolf Date: Fri, 23 Jan 2009 17:00:43 -0500 Subject: [PATCH] add a test that saving strings means retrieving unicode --- test/test_bson.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/test_bson.py b/test/test_bson.py index c40f4cd50..ed23004de 100644 --- a/test/test_bson.py +++ b/test/test_bson.py @@ -19,6 +19,7 @@ import datetime import re import glob import sys +import types import qcheck from pymongo.binary import Binary @@ -101,6 +102,8 @@ class TestBSON(unittest.TestCase): self.assertEqual(dict, (BSON.from_dict(dict)).to_dict()) helper({}) helper({"test": u"hello"}) + self.assertTrue(isinstance(BSON.from_dict({"hello": "world"}).to_dict()["hello"], + types.UnicodeType)) helper({"mike": -10120}) helper({u"hello": 0.0013109}) helper({"something": True})