diff options
Diffstat (limited to 'tests/test_xbox.py')
| -rw-r--r-- | tests/test_xbox.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_xbox.py b/tests/test_xbox.py index 8844e3b..d37423e 100644 --- a/tests/test_xbox.py +++ b/tests/test_xbox.py @@ -410,6 +410,13 @@ class Commands(Base): with self.assertRaises(xb.ModuleError): x.command("wake", {"console": "OTHER"}) + def test_an_unreachable_console_says_what_to_do(self): + self.fake.answers["/commands"] = {"status": {"errorCode": "ErrorCallingWNS", "errorMessage": "Send command failed"}} + x = self.xbox() + x.tick() + with self.assertRaisesRegex(xb.ModuleError, "turn it on by hand"): + x.command("wake", {"console": "CON1"}) + def test_an_xccs_error_becomes_the_message(self): self.fake.answers["/commands"] = {"status": {"errorCode": "DeviceUnavailable", "errorMessage": "Console is off"}} x = self.xbox() |
