'test making a data source name from host, port and sid'

def testMakeDSN(self):

    formatString = u'(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=%s)(PORT=%d)))(CONNECT_DATA=(SID=%s)))'
    args = (u'hostname', 1521, u'TEST')
    result = cx_Oracle.makedsn(*args)
    self.failUnlessEqual(result, (formatString % args))
