File tree Expand file tree Collapse file tree 2 files changed +0
-18
lines changed
dbt-redshift/tests/functional/functions
dbt-tests-adapter/src/dbt/tests/adapter/functions Expand file tree Collapse file tree 2 files changed +0
-18
lines changed Original file line number Diff line number Diff line change @@ -15,20 +15,3 @@ def functions(self):
1515 "price_for_xlarge.sql" : MY_UDF_SQL ,
1616 "price_for_xlarge.yml" : MY_UDF_YML ,
1717 }
18-
19- def test_udfs (self , project ):
20- result = run_dbt (["build" , "--debug" ])
21-
22- assert len (result .results ) == 1
23- node_result = result .results [0 ]
24- assert node_result .status == RunStatus .Success
25- node = node_result .node
26- assert isinstance (node , FunctionNode )
27- assert node_result .node .name == "price_for_xlarge"
28-
29- # TODO: use `function` instead of `ref`
30- result = run_dbt (["show" , "--inline" , "SELECT {{ function('price_for_xlarge') }}(100)" ])
31- assert len (result .results ) == 1
32- # The result should have an agate table with one row and one column (and thus only one value, which is our inline selection)
33- select_value = int (result .results [0 ].agate_table .rows [0 ].values ()[0 ])
34- assert select_value == 200 # the UDF should return 2x the input value (100 * 2 = 200)
Original file line number Diff line number Diff line change @@ -25,7 +25,6 @@ def test_udfs(self, project):
2525 assert isinstance (node , FunctionNode )
2626 assert node_result .node .name == "price_for_xlarge"
2727
28- # TODO: use `function` instead of `ref`
2928 result = run_dbt (["show" , "--inline" , "SELECT {{ function('price_for_xlarge') }}(100)" ])
3029 assert len (result .results ) == 1
3130 # The result should have an agate table with one row and one column (and thus only one value, which is our inline selection)
You can’t perform that action at this time.
0 commit comments