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/07/06 09:47:16 UTC

[GitHub] [airflow] kaxil commented on a diff in pull request #24079: Add: #23880 :: Audit log for AirflowModelViews(Variables/Connection)

kaxil commented on code in PR #24079:
URL: https://github.com/apache/airflow/pull/24079#discussion_r914642164


##########
tests/test_utils/www.py:
##########
@@ -45,3 +47,28 @@ def check_content_not_in_response(text, resp, resp_code=200):
             assert line not in resp_html
     else:
         assert text not in resp_html
+
+
+def _check_last_log(session, dag_id, event, execution_date):
+    logs = (
+        session.query(
+            Log.dag_id,
+            Log.task_id,
+            Log.event,
+            Log.execution_date,
+            Log.owner,
+            Log.extra,
+        )
+        .filter(
+            Log.dag_id == dag_id,
+            Log.event == event,
+            Log.execution_date == execution_date,
+        )
+        .order_by(Log.dttm.desc())
+        .limit(5)
+        .all()
+    )
+    assert len(logs) >= 1
+    assert logs[0].extra
+    print(logs[0].event)

Review Comment:
   Can be removed?



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