mik-laj commented on a change in pull request #16842:
URL: https://github.com/apache/airflow/pull/16842#discussion_r664979838
##########
File path: tests/api_connexion/endpoints/test_dag_endpoint.py
##########
@@ -137,54 +155,44 @@ def _create_deactivated_dag(self, session=None):
class TestGetDag(TestDagEndpoint):
- @conf_vars({("webserver", "secret_key"): "mysecret"})
def test_should_respond_200(self):
- self._create_dag_models(1)
- response = self.client.get("/api/v1/dags/TEST_DAG_1",
environ_overrides={'REMOTE_USER': "test"})
+ response = self.client.get(f"/api/v1/dags/{self.dag_id}",
environ_overrides={'REMOTE_USER': "test"})
assert response.status_code == 200
assert {
- "dag_id": "TEST_DAG_1",
+ "dag_id": self.dag_id,
"description": None,
- "fileloc": "/tmp/dag_1.py",
- "file_token": 'Ii90bXAvZGFnXzEucHki.EnmIdPaUPo26lHQClbWMbDFD1Pk',
- "is_paused": False,
- "is_active": True,
+ "fileloc": __file__,
+ "file_token": FILE_TOKEN,
+ "is_paused": None,
Review comment:
is_active is a filter parameter, so we should return it in response also
for readability and not to expose ourselves to accidental leakage of
information.
--
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]