@@ -0,0 +1,483 @@
+# -*- coding: utf-8 -*-%0A%0Adef test_json_base64_encode_chunks():%0A    import StringIO%0A    from c2cgeoportal.views.echo import json_base64_encode_chunks%0A%0A    sio = StringIO.StringIO()%0A    sio.write('some content with non-ASCII chars %C3%A7 %C3%A0 %C3%A9')%0A    sio.flush()%0A    sio.seek(0)%0A%0A    a = %5Bs for s in json_base64_encode_chunks('a file name', sio)%5D%0A    s = ''.join(a)%0A%0A    assert s == '%7B%22filename%22:%22a file name%22,%22data%22:%22c29tZSBjb250ZW50IHdpdGggbm9uLUFTQ0lJIGNoYXJzIMOnIMOgIMOp%22,%22success%22:true%7D'%0A

add unit test for json_base64_encode_chunks