uranusjr commented on code in PR #33938:
URL: https://github.com/apache/airflow/pull/33938#discussion_r1311057685
##########
tests/www/views/test_views_base.py:
##########
@@ -251,7 +251,7 @@ def test_views_get(request, url, client, content):
def _check_task_stats_json(resp):
- return set(list(resp.json.items())[0][1][0].keys()) == {"state", "count"}
+ return set(next(iter(resp.json.items()))[1][0].keys()) == {"state",
"count"}
Review Comment:
```suggestion
return set(next(iter(resp.json.items()))[1][0]) == {"state", "count"}
```
While we’re at it
##########
tests/www/views/test_views_base.py:
##########
@@ -251,7 +251,7 @@ def test_views_get(request, url, client, content):
def _check_task_stats_json(resp):
- return set(list(resp.json.items())[0][1][0].keys()) == {"state", "count"}
+ return set(next(iter(resp.json.items()))[1][0].keys()) == {"state",
"count"}
Review Comment:
```suggestion
return set(next(iter(resp.json.items()))[1][0]) == {"state", "count"}
```
While we’re at it
--
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]