Skip to content

Commit 9d89eb3

Browse files
author
codedawi
committed
🐛 fixing minor await bug in tests
1 parent 6ba764d commit 9d89eb3

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/test_location_service.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ async def get_all(self):
88
"""
99
Gets and returns all of the locations.
1010
"""
11-
return [True, True]
11+
return [1]
1212

1313
async def get(self, id): # pylint: disable=redefined-builtin,invalid-name
1414
"""
@@ -27,9 +27,10 @@ def test_location_service_invalid():
2727
BadLocationService()
2828

2929

30-
def test_location_service_invalid():
30+
@pytest.mark.asyncio
31+
async def test_location_service_invalid():
3132
"""Test for location service interface valid class."""
3233
good_loc_service = GoodLocationService()
33-
assert all(good_loc_service.get_all())
34-
assert good_loc_service.get(1) == 1
34+
assert [1] == await good_loc_service.get_all()
35+
assert 1 == await good_loc_service.get(1)
3536

0 commit comments

Comments
 (0)