FrankYang0529 commented on code in PR #72055:
URL: https://github.com/apache/airflow/pull/72055#discussion_r4023122643


##########
airflow-core/tests/unit/utils/test_db.py:
##########
@@ -229,10 +228,8 @@ def test_has_pending_upgrade_ops(self, initialized_db):
         check(config)
 
     def test_default_connections_sort(self):
-        pattern = re.compile("conn_id=[\"|'](.*?)[\"|']", re.DOTALL)
-        source = inspect.getsource(create_default_connections)
-        src = pattern.findall(source)
-        assert sorted(src) == src
+        conn_ids = [c.conn_id for c in get_default_connections()]
+        assert conn_ids == sorted(conn_ids)

Review Comment:
   Sorry for the late reply and thanks for the suggestion. Added `assert 
conn_ids` to keep the test from silently passing again.



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