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 2022/10/06 21:19:10 UTC

[GitHub] [airflow] pierrejeambrun commented on a diff in pull request #26926: Fix auto refresh for graph view

pierrejeambrun commented on code in PR #26926:
URL: https://github.com/apache/airflow/pull/26926#discussion_r989490980


##########
tests/www/views/test_views_tasks.py:
##########
@@ -993,3 +993,220 @@ def test_graph_view_doesnt_fail_on_recursion_error(app, dag_maker, admin_client)
         url = f'/dags/{dag.dag_id}/graph'
         resp = admin_client.get(url, follow_redirects=True)
         assert resp.status_code == 200
+
+
+def test_task_instances(app, dag_maker, admin_client):
+    """Test task_instances view."""
+    resp = admin_client.get(
+        f'/object/task_instances?dag_id=example_bash_operator&execution_date={DEFAULT_DATE}',
+        follow_redirects=True,
+    )
+    assert resp.status_code == 200
+    payload = resp.json
+    for v in payload.values():
+        assert v.pop('updated_at')

Review Comment:
   Is there a way to mock the server_default, for `updated_at` so I can assert the entire response ?



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org