예제 #1
0
 def test_available(self):
     assert bson.IS_AVAILABLE
     bson.BsonConfigFormat()
예제 #2
0
 def test_dumps(self):
     fmt = bson.BsonConfigFormat()
     obj = {'x': 1}
     assert fmt.dumps(None, obj) == bson_lib.dumps(obj)
예제 #3
0
 def test_loads(self):
     fmt = bson.BsonConfigFormat()
     obj = {'x': 1}
     bobj = bson_lib.dumps(obj)
     assert fmt.loads(None, bobj) == obj
예제 #4
0
 def test_not_available(self):
     with pytest.raises(TypeError):
         x = bson.BsonConfigFormat()