Skip to content

Commit

Permalink
Move to aioresponses library to simplify aiohttp tests (#60)
Browse files Browse the repository at this point in the history
Co-authored-by: Abílio Costa <[email protected]>
  • Loading branch information
NodeJSmith and abmantis authored Aug 6, 2024
1 parent 3991322 commit 739c990
Show file tree
Hide file tree
Showing 19 changed files with 3,073 additions and 2,683 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11"]
python-version: ["3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand Down
4 changes: 2 additions & 2 deletions cli_ac_menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ def attr_upd():
elif choice == "v":
print(ac._data_dict)
elif choice == "c":
cmd = aioconsole.ainput("Command: ")
val = aioconsole.ainput("Value: ")
cmd = await aioconsole.ainput("Command: ")
val = await aioconsole.ainput("Value: ")
await ac.send_attributes({cmd: val})
elif choice == "q":
await ac.disconnect()
Expand Down
4 changes: 2 additions & 2 deletions cli_oven_menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ def attr_upd():
elif choice == "v":
print(ov._data_dict)
elif choice == "c":
cmd = aioconsole.ainput("Command: ")
val = aioconsole.ainput("Value: ")
cmd = await aioconsole.ainput("Command: ")
val = await aioconsole.ainput("Value: ")
await ov.send_attributes({cmd: val})
elif choice == "q":
await ov.disconnect()
Expand Down
4 changes: 2 additions & 2 deletions cli_washerdryer_menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ def attr_upd():
elif choice == "v":
print(wd._data_dict)
elif choice == "c":
cmd = aioconsole.ainput("Command: ")
val = aioconsole.ainput("Value: ")
cmd = await aioconsole.ainput("Command: ")
val = await aioconsole.ainput("Value: ")
await wd.send_attributes({cmd: val})
elif choice == "q":
await wd.disconnect()
Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ black
pytest>=6.2.0
pytest-asyncio>=0.15.0
pytest-mock>=3.6.0
aioresponses==0.7.6
Loading

0 comments on commit 739c990

Please sign in to comment.