ashb commented on a change in pull request #6302: [AIRFLOW-5636] Allow adding or overriding existing Operator Links for… URL: https://github.com/apache/airflow/pull/6302#discussion_r333973855
########## File path: tests/www/test_views.py ########## @@ -1854,6 +1856,24 @@ def test_extra_links_no_response(self, get_dag_function): 'url': None, 'error': 'No URL found for no_response'}) + @mock.patch('airflow.www.views.dagbag.get_dag') + def test_operator_extra_link_override_plugin(self, get_dag_function): + get_dag_function.return_value = self.dag + + response = self.client.get( + "{0}?dag_id={1}&task_id={2}&execution_date={3}&link_name=airflow".format( + self.ENDPOINT, self.dag.dag_id, self.task_2.task_id, self.DEFAULT_DATE), + follow_redirects=True) + + self.assertEqual(response.status_code, 200) + response_str = response.data + if isinstance(response.data, bytes): + response_str = response_str.decode() + self.assertEqual(json.loads(response_str), { + 'url': 'https://airflow.apache.org/1.10.5/', Review comment: I'm not quite sure what this is testing, nor where this string is coming from in the code? ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services