You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/04/23 09:24:17 UTC

[GitHub] [airflow] ashb commented on a change in pull request #8505: [POC] Add more precise tests (tests for jinja params) for AirflowVersion

ashb commented on a change in pull request #8505:
URL: https://github.com/apache/airflow/pull/8505#discussion_r413657261



##########
File path: tests/test_utils/asserts.py
##########
@@ -71,3 +72,33 @@ def assert_queries_count(expected_count, message_fmt=None):
                                  "The current number is {current_count}."
     message = message_fmt.format(current_count=result.count, expected_count=expected_count)
     assert expected_count == result.count, message
+
+
+class CatchJinjaParmasResult:
+    def __init__(self):
+        self.template_name = None
+        self.template_params = None
+
+
+@contextmanager
+def catch_jinja_params():

Review comment:
       And rather than a separate method/in utils, I would suggest making this a method on the already existing  TestBase class -- after all it is only useful if you have a flask app, and TestBase sets that up for us.
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org