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 2021/11/25 01:17:30 UTC
[GitHub] [airflow] rsg17 commented on a change in pull request #19727: Add test case for views connections muldelete function
rsg17 commented on a change in pull request #19727:
URL: https://github.com/apache/airflow/pull/19727#discussion_r756509095
##########
File path: tests/www/views/test_views_connection.py
##########
@@ -180,3 +180,27 @@ def test_duplicate_connection_error(admin_client):
assert resp.status_code == 200
response = {conn[0] for conn in session.query(Connection.conn_id).all()}
assert expected_result == response
+
+
+@pytest.fixture()
+def connection():
+ connection = Connection(
+ conn_id='conn1',
+ conn_type='Conn 1',
+ description='Conn 1 description'
+ )
+ with create_session() as session:
+ session.add(connection)
+ session.commit()
+ yield connection
+ session.query(Connection).filter(Connection.conn_id == CONNECTION["conn_id"]).delete()
+ session.commit()
Review comment:
Updated and tested 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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org