Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

Commit

Permalink
add test_blob and fix environ keyerror
Browse files Browse the repository at this point in the history
  • Loading branch information
haleemur committed Jul 20, 2022
1 parent 56f7303 commit abb6ea1
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions tests/integration/test_tap_mysql.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,16 @@ def test_geometrycollection(self):
'sql-datatype': 'geometrycollection',
'datatype': 'geometrycollection'})

def test_blob(self):
actual = self.schema.properties['c_blob']
self.assertEqual(actual,
Schema(['null', 'string'],
format='binary',
inclusion='available'))
self.assertEqual(self.get_metadata_for_column('c_blob'),
{'selected-by-default': True,
'sql-datatype': 'blob',
'datatype': 'blob'})

class TestSelectsAppropriateColumns(unittest.TestCase):

Expand Down Expand Up @@ -715,10 +725,10 @@ def setUp(self):
cursor.execute('CREATE TABLE binlog_1 (id int, updated datetime, '
'created_date Date)')
cursor.execute("""
CREATE TABLE binlog_2 (id int,
updated datetime,
is_good bool default False,
ctime time,
CREATE TABLE binlog_2 (id int,
updated datetime,
is_good bool default False,
ctime time,
cjson json)
""")
cursor.execute(
Expand Down Expand Up @@ -1012,7 +1022,7 @@ def test_binlog_stream_with_gtid(self):
global SINGER_MESSAGES

engine = os.getenv('TAP_MYSQL_ENGINE', MYSQL_ENGINE)
gtid = binlog.fetch_current_gtid_pos(self.conn, os.environ['TAP_MYSQL_ENGINE'])
gtid = binlog.fetch_current_gtid_pos(self.conn, engine)

config = test_utils.get_db_config()
config['use_gtid'] = True
Expand Down

0 comments on commit abb6ea1

Please sign in to comment.