|
|
@@ -278,6 +278,13 @@ class _JSONEncoder(json.JSONEncoder): |
|
|
|
|
|
|
|
_jsonencoder = _JSONEncoder() |
|
|
|
|
|
|
|
class _TestJSONEncoder(unittest.TestCase): |
|
|
|
def test_defaultfailure(self): |
|
|
|
class Foo: |
|
|
|
pass |
|
|
|
|
|
|
|
self.assertRaises(TypeError, _jsonencoder.encode, Foo()) |
|
|
|
|
|
|
|
class Persona(object): |
|
|
|
'''The object that represents a persona, or identity. It will |
|
|
|
create the proper identity object, serialize for saving keys, |
|
|
|