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/06/18 14:19:06 UTC

[GitHub] [airflow] mik-laj commented on a change in pull request #9380: Use current_app.dag_bag instead of global variable

mik-laj commented on a change in pull request #9380:
URL: https://github.com/apache/airflow/pull/9380#discussion_r442262100



##########
File path: tests/www/test_views.py
##########
@@ -2535,7 +2531,7 @@ def test_operator_extra_link_multiple_operators(self, get_dag_function):
         AirflowLink2 returns 'https://airflow.apache.org/1.10.5/' link
         GoogleLink returns 'https://www.google.com'
         """
-        get_dag_function.return_value = self.dag
+        mock_get_dagbag.return_value.get_dag.return_value = self.dag

Review comment:
       ```suggestion
           self.app.dagbag = mock.MagicMock(**{'get_dag.return_vaalue': self.dag})
   ```




----------------------------------------------------------------
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