Skip to content

Commit

Permalink
encode test failure fix (dbcli#286)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gene Lee authored Sep 11, 2019
1 parent 9987e1c commit d1baf2d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/test_mssqlcliclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import io
import unittest
import mssqlcli.sqltoolsclient as sqltoolsclient
from utility import random_str
from utility import random_str, decode
import socket

from mssqlcli.jsonrpc.jsonrpcclient import JsonRpcWriter
Expand Down Expand Up @@ -223,10 +223,10 @@ def test_select_result_unicode_encoded(self):
select_query = u"SELECT * FROM {0};".format(table_name)
for rows, columns, status, statement, is_error in client.execute_query(select_query):
assert is_error == False
assert columns[0] == '\xec\xbb\xac\xeb\x9f\xbc1'
assert columns[1] == '\xec\xbb\xac\xeb\x9f\xbc2'
assert rows[0][0] == '\xed\x85\x8c\xec\x8a\xa4\xed\x8a\xb81'
assert rows[1][0] == '\xed\x85\x8c\xec\x8a\xa4\xed\x8a\xb82'
assert decode(columns[0]) == u'컬럼1'
assert decode(columns[1]) == u'컬럼2'
assert decode(rows[0][0]) == u'테스트1'
assert decode(rows[1][0]) == u'테스트2'
finally:
shutdown(client)

Expand Down

0 comments on commit d1baf2d

Please sign in to comment.