diff --git a/tests/initial_setup.sh b/tests/initial_setup.sh index 69acda7..637e3cc 100644 --- a/tests/initial_setup.sh +++ b/tests/initial_setup.sh @@ -28,8 +28,8 @@ wget -O metabase.jar -q https://downloads.metabase.com/v$MB_VERSION/metabase.jar # starting metabase jar locally java -jar metabase.jar > logs 2>&1 & -# waiting 45 seconds for the initialization to complete -sleep 45 +# waiting 60 seconds for the initialization to complete +sleep 60 # checking whether the metabase initialization has completed. If not, wait another 45 seconds success='False' @@ -102,7 +102,7 @@ json='{ "dataset_query":{ "type":"native", "native":{ - "query":"select *\nfrom test_table\nwhere 1 = 1 \n[[ and {{test_filter}} ]]\n", + "query":"select *\nfrom test_table2\nwhere 1 = 1 \n[[ and {{test_filter}} ]]\n", "template-tags":{ "test_filter":{ "name":"test_filter", diff --git a/tests/test_metabase_api.py b/tests/test_metabase_api.py index 43f7ac7..f6d98a0 100644 --- a/tests/test_metabase_api.py +++ b/tests/test_metabase_api.py @@ -265,10 +265,10 @@ def test_get_card_data(self): csv_data = 'col1,col2\nrow1 cell1,1\n,2\nrow3 cell1,\n,\nrow5 cell1,5\n' self.assertEqual(res, csv_data) - # # filtered data - # res = mb.get_card_data(card_id=2, parameters=[{"type":"string/=","value":['row1 cell1', 'row3 cell1'],"target":["dimension",["template-tag","test_filter"]]}]) - # filtered_data = [{'col1': 'row1 cell1', 'col2': 1}, {'col1': 'row3 cell1', 'col2': None}] - # self.assertEqual(res, filtered_data) + # filtered data + res = mb.get_card_data(card_id=2, parameters=[{"type":"string/=","value":['row1 cell1', 'row3 cell1'],"target":["dimension",["template-tag","test_filter"]]}]) + filtered_data = [{'col1': 'row1 cell1', 'col2': '1'}, {'col1': 'row3 cell1', 'col2': None}] + self.assertEqual(res, filtered_data)