Skip to content

Commit 182998f

Browse files
authored
used set instead of list to compare dict.keys() (#186)
1 parent c5caa7f commit 182998f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

google_health/tests/test_pull_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def test_class_state(self):
3636
]
3737

3838
assert len(res["lines"][0]["points"]) == 2
39-
assert [x for x in res["lines"][0]["points"][0].keys()] == ["date", "value"]
39+
assert set([x for x in res["lines"][0]["points"][0].keys()]) == ["date", "value"]
4040
assert res["lines"][0]["points"][0]["date"] == "May 05 2020"
4141
assert res["lines"][0]["points"][1]["date"] == "May 06 2020"
4242

@@ -55,7 +55,7 @@ def test_class_dma(self):
5555
]
5656

5757
assert len(res["lines"][0]["points"]) == 2
58-
assert [x for x in res["lines"][0]["points"][0].keys()] == ["date", "value"]
58+
assert set([x for x in res["lines"][0]["points"][0].keys()]) == ["date", "value"]
5959
assert res["lines"][0]["points"][0]["date"] == "May 05 2020"
6060
assert res["lines"][0]["points"][1]["date"] == "May 06 2020"
6161

0 commit comments

Comments
 (0)