def test_dag_run_link(self): from airflow.www.app import cached_app with cached_app(testing=True).test_request_context(): html = str( utils.dag_run_link({'dag_id': '<a&1>', 'run_id': '<b2>', 'execution_date': datetime.now()}) ) self.assertIn('%3Ca%261%3E', html) self.assertIn('%3Cb2%3E', html) self.assertNotIn('<a&1>', html) self.assertNotIn('<b2>', html)
def test_dag_run_link(self): from airflow.www.app import cached_appbuilder with cached_appbuilder(testing=True).app.test_request_context(): html = str(utils.dag_run_link({ 'dag_id': '<a&1>', 'run_id': '<b2>', 'execution_date': datetime.now() })) self.assertIn('%3Ca%261%3E', html) self.assertIn('%3Cb2%3E', html) self.assertNotIn('<a&1>', html) self.assertNotIn('<b2>', html)