ashb commented on code in PR #26228:
URL: https://github.com/apache/airflow/pull/26228#discussion_r965804743
##########
tests/www/views/test_views_base.py:
##########
@@ -35,16 +34,14 @@ def test_index(admin_client):
check_content_in_response('DAGs', resp)
-def test_doc_urls(admin_client):
+def test_doc_urls(admin_client, monkeypatch):
+ # Mocking this way is tying the test closer to the implementation much
more than I'd like. :shrug:
+ from airflow.www.views import AirflowBaseView
+
+ monkeypatch.setitem(AirflowBaseView.extra_args, 'get_docs_url', lambda _:
"!!DOCS_URL!!")
resp = admin_client.get('/', follow_redirects=True)
- if "dev" in version.version:
Review Comment:
I did this, as otherwise we are just re-implementing the get_docs_url logic
here in the test.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]