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


##########
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:
   thanks @uranusjr, much cleaner this way. I naively froze time on the test, 
which had no effect since fixture init happens before 🤦‍♂️ 



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

Reply via email to