You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ka...@apache.org on 2021/01/13 19:20:45 UTC
[airflow] branch fix-heading created (now 4ae723d)
This is an automated email from the ASF dual-hosted git repository.
kaxilnaik pushed a change to branch fix-heading
in repository https://gitbox.apache.org/repos/asf/airflow.git.
at 4ae723d Docs: Fix heading for Mocking section in best-practices.rst
This branch includes the following new commits:
new 4ae723d Docs: Fix heading for Mocking section in best-practices.rst
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[airflow] 01/01: Docs: Fix heading for Mocking section in
best-practices.rst
Posted by ka...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
kaxilnaik pushed a commit to branch fix-heading
in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 4ae723dc62672f53b416b275a8c53150a8b980b1
Author: Kaxil Naik <ka...@gmail.com>
AuthorDate: Wed Jan 13 19:18:33 2021 +0000
Docs: Fix heading for Mocking section in best-practices.rst
Currently 'Mocking variables and connections' section is on same level
as Best Practices (`h1` heading):
http://apache-airflow-docs.s3-website.eu-central-1.amazonaws.com/docs/apache-airflow/latest/best-practices.html
Because of which this heading shows in TOC
---
docs/apache-airflow/best-practices.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/apache-airflow/best-practices.rst b/docs/apache-airflow/best-practices.rst
index 56c834c..2289269 100644
--- a/docs/apache-airflow/best-practices.rst
+++ b/docs/apache-airflow/best-practices.rst
@@ -238,7 +238,7 @@ You can use environment variables to parameterize the DAG.
)
Mocking variables and connections
-=================================
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
When you write tests for code that uses variables or a connection, you must ensure that they exist when you run the tests. The obvious solution is to save these objects to the database so they can be read while your code is executing. However, reading and writing objects to the database are burdened with additional time overhead. In order to speed up the test execution, it is worth simulating the existence of these objects without saving them to the database. For this, you can create env [...]