Skip to content

Commit

Permalink
Merge pull request #78 from esev/vcr
Browse files Browse the repository at this point in the history
Add integration test for RX-V577
  • Loading branch information
wuub authored Jan 25, 2021
2 parents 54a5a5b + e1a4b39 commit 4858e3c
Show file tree
Hide file tree
Showing 10 changed files with 2,165 additions and 2 deletions.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
include Makefile
recursive-include tests *.py
recursive-include tests *.xml
recursive-include tests *.yaml
5 changes: 3 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ testing =
flake8
mock
pytest
pytest-cov
pytest-cov
pytest-timeout
pytest-vcr
requests-mock
tox

Expand Down Expand Up @@ -77,7 +78,7 @@ commands = py.test --cov --cov-report=term --cov-report=xml {posargs}

[testenv:flake8]
description = run flake8 under {basepython}
commands = flake8 rxv/ tests/
commands = flake8 rxv/ tests/
extras = testing

[testenv:manifest]
Expand Down
795 changes: 795 additions & 0 deletions tests/integration/cassettes/test_RX_V577/RX-V577.yaml

Large diffs are not rendered by default.

66 changes: 66 additions & 0 deletions tests/integration/cassettes/test_RX_V577/test_basic_status.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
interactions:
- request:
body: <YAMAHA_AV cmd="GET"><Main_Zone><Basic_Status>GetParam</Basic_Status></Main_Zone></YAMAHA_AV>
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
Content-Length:
- '93'
Content-Type:
- text/xml
User-Agent:
- python-requests/2.25.1
method: POST
uri: http://192.168.1.100/YamahaRemoteControl/ctrl
response:
body:
string: <YAMAHA_AV rsp="GET" RC="0"><Main_Zone><Basic_Status><Power_Control><Power>On</Power><Zone_B_Power_Info>Standby</Zone_B_Power_Info><Sleep>Off</Sleep></Power_Control><Volume><Lvl><Val>-510</Val><Exp>1</Exp><Unit>dB</Unit></Lvl><Mute>Off</Mute><Subwoofer_Trim><Val>0</Val><Exp>1</Exp><Unit>dB</Unit></Subwoofer_Trim><Scale>dB</Scale><Zone_B><Feature_Availability>Not
Ready</Feature_Availability><Interlock>On</Interlock><Lvl><Val>-510</Val><Exp>1</Exp><Unit>dB</Unit></Lvl><Mute>Off</Mute></Zone_B></Volume><Input><Input_Sel>NET
RADIO</Input_Sel><Input_Sel_Item_Info><Param>NET RADIO</Param><RW>RW</RW><Title>NET
RADIO</Title><Icon><On>/YamahaRemoteControl/Icons/icon005.png</On><Off></Off></Icon><Src_Name>NET_RADIO</Src_Name><Src_Number>1</Src_Number></Input_Sel_Item_Info></Input><Surround><Program_Sel><Current><Straight>Off</Straight><Enhancer>On</Enhancer><Sound_Program>7ch
Stereo</Sound_Program></Current></Program_Sel><_3D_Cinema_DSP>Auto</_3D_Cinema_DSP></Surround><Sound_Video><Tone><Bass><Val>0</Val><Exp>1</Exp><Unit>dB</Unit></Bass><Treble><Val>0</Val><Exp>1</Exp><Unit>dB</Unit></Treble></Tone><Direct><Mode>Off</Mode></Direct><HDMI><Standby_Through_Info>On</Standby_Through_Info><Output><OUT_1>On</OUT_1></Output></HDMI><Extra_Bass>Off</Extra_Bass><Adaptive_DRC>Off</Adaptive_DRC></Sound_Video><Speaker_Preout><Speaker_AB><Speaker_A>On</Speaker_A><Speaker_B>Off</Speaker_B></Speaker_AB></Speaker_Preout></Basic_Status></Main_Zone></YAMAHA_AV>
headers:
Content-Length:
- '1456'
Content-Type:
- text/xml; charset="utf-8"
Server:
- AV_Receiver/3.1 (RX-V577)
status:
code: 200
message: OK
- request:
body: <YAMAHA_AV cmd="GET"><Main_Zone><Input><Input_Sel>GetParam</Input_Sel></Input></Main_Zone></YAMAHA_AV>
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
Content-Length:
- '102'
Content-Type:
- text/xml
User-Agent:
- python-requests/2.25.1
method: POST
uri: http://192.168.1.100/YamahaRemoteControl/ctrl
response:
body:
string: <YAMAHA_AV rsp="GET" RC="0"><Main_Zone><Input><Input_Sel>NET RADIO</Input_Sel></Input></Main_Zone></YAMAHA_AV>
headers:
Content-Length:
- '110'
Content-Type:
- text/xml; charset="utf-8"
Server:
- AV_Receiver/3.1 (RX-V577)
status:
code: 200
message: OK
version: 1
Loading

0 comments on commit 4858e3c

Please sign in to comment.