Skip to content

Commit 0f684e5

Browse files
committed
Fix tests
1 parent 07a8b8b commit 0f684e5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/test_sdk.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ def test_flow(self, mock_post, mock_put, mock_get):
297297
check_sql_call(mock_post, 'DROP DATABASE `proj1-1`')
298298

299299
# test upload file
300-
response_mock(mock_post, pd.DataFrame([{'NAME': 'files', 'ENGINE': 'file'}]))
300+
response_mock(mock_post, pd.DataFrame([{'NAME': 'files', 'ENGINE': 'file', 'CONNECTION_DATA': {'host': 'woop'}}]))
301301
database = server.get_database('files')
302302
# create file
303303
df = pd.DataFrame([{'s': '1'}, {'s': 'a'}])
@@ -619,11 +619,11 @@ def test_flow(self, mock_post, mock_put):
619619
assert call_args[1]['json']['email'] == '[email protected]'
620620

621621
# --------- databases -------------
622-
response_mock(mock_post, pd.DataFrame([{'NAME': 'db1', 'ENGINE': 'postgres'}]))
622+
response_mock(mock_post, pd.DataFrame([{'NAME': 'db1', 'ENGINE': 'postgres', 'CONNECTION_DATA': {}}]))
623623

624624
databases = con.databases.list()
625625

626-
check_sql_call(mock_post, "select NAME, ENGINE from information_schema.databases where TYPE='data'")
626+
check_sql_call(mock_post, "select NAME, ENGINE, CONNECTION_DATA from information_schema.databases where TYPE='data'")
627627

628628
database = databases[0]
629629
assert database.name == 'db1'
@@ -670,7 +670,7 @@ def test_flow(self, mock_post, mock_put):
670670
check_sql_call(mock_post, 'DROP DATABASE `proj1-1`')
671671

672672
# test upload file
673-
response_mock(mock_post, pd.DataFrame([{'NAME': 'files', 'ENGINE': 'file'}]))
673+
response_mock(mock_post, pd.DataFrame([{'NAME': 'files', 'ENGINE': 'file', 'CONNECTION_DATA': {}}]))
674674
database = con.databases.files
675675
# create file
676676
df = pd.DataFrame([{'s': '1'}, {'s': 'a'}])

0 commit comments

Comments
 (0)