Skip to content

Commit

Permalink
Fix template extension bug (#64)
Browse files Browse the repository at this point in the history
Adds a comma to the end of the template_ext set, making the quoted
'.sql' a member of the set, not each character in the string a member
of the set. This was breaking jinja templating. Testing has been
updated to ensure the whole value, not the characters, of the elements
of the template_ext set are present.
  • Loading branch information
denimalpaca authored Nov 23, 2022
1 parent 1318b93 commit 3d07ab9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions great_expectations_provider/operators/great_expectations.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ class GreatExpectationsOperator(BaseOperator):
"data_context_root_dir",
"checkpoint_name",
"checkpoint_kwargs",
"query_to_validate"
"query_to_validate",
)
template_ext = (".sql")
template_ext = (".sql",)
operator_extra_links = (GreatExpectationsDataDocsLink(),)

def __init__(
Expand Down
3 changes: 2 additions & 1 deletion tests/operators/test_great_expectations.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,8 @@ def test_great_expectations_operator__assert_template_ext_exist():
data_context_root_dir=ge_root_dir,
checkpoint_name="taxi.pass.chk",
)
assert ".sql" in operator.template_ext
for ext in operator.template_ext:
assert ext == ".sql"


def test_great_expectations_operator__context_root_dir_and_checkpoint_name_pass():
Expand Down

0 comments on commit 3d07ab9

Please sign in to comment.