ferruzzi commented on code in PR #53831:
URL: https://github.com/apache/airflow/pull/53831#discussion_r2283486634


##########
airflow-core/tests/unit/models/test_deadline.py:
##########
@@ -87,19 +98,7 @@ def setup_method():
     def teardown_method():
         _clean_db()
 
-    def test_add_deadline(self, dagrun, session):
-        assert session.query(Deadline).count() == 0
-        deadline_orm = Deadline(
-            deadline_time=DEFAULT_DATE,
-            callback=TEST_ASYNC_CALLBACK,
-            dagrun_id=dagrun.id,
-        )
-
-        session.add(deadline_orm)
-        session.flush()
-
-        assert session.query(Deadline).count() == 1
-
+    def test_add_deadline(self, dagrun, deadline_orm, session):

Review Comment:
   I think it is still verifying serialization/deserialization, isn't it? 
Create the Deadline object, write it to the db, read it back and make sure it's 
all still what we expected?



##########
airflow-core/tests/unit/models/test_deadline.py:
##########
@@ -142,32 +149,18 @@ def test_prune_deadlines(self, mock_session, conditions):
         else:
             mock_session.query.assert_not_called()
 
-    def test_orm(self):
-        deadline_orm = Deadline(
-            deadline_time=DEFAULT_DATE,
-            callback=TEST_ASYNC_CALLBACK,
-            dagrun_id=RUN_ID,
-        )
-
+    def test_orm(self, deadline_orm, dagrun):

Review Comment:
   I think it is still verifying serialization/deserialization, isn't it?  
Create the Deadline object, write it to the db, read it back and make sure it's 
all still what we expected?



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