"""
$URL: svn+ssh://svn.mems-exchange.org/repos/trunk/dulcinea/lib/ui/test/utest_util.py $
$Id: utest_util.py 29354 2007-02-09 22:26:41Z dbinger $
"""
from dulcinea.common import CommonTest
from dulcinea.ui.util import csv
from qp.pub.common import get_response

class MiscTest (CommonTest):

    def check_csv (self):
        s = csv(['a','b'], [{'a':1}, {'a':2, 'b':3}])
        assert s == 'a,b\r\n1,\r\n2,3\r\n'
        response = get_response()
        mime_type = response.get_mime_type()
        assert mime_type == 'text/comma-separated-values'

if __name__ == "__main__":
    MiscTest()
