async def power_off(self, liveid: str) -> None: """ Power off console Args: liveid: Live ID of console Returns: None """ msg = factory.power_off(liveid) await self.send_message(msg)
def power_off(self, liveid): """ Power off console Args: liveid (str): Live ID of console Returns: None """ msg = factory.power_off(liveid) self.send_message(msg)
def test_power_off(packets, crypto): bin_name = 'power_off' msg = factory.power_off(liveid='FD00112233FFEE66') msg.header(sequence_number=1882, source_participant_id=2) msg.header.flags(need_ack=True) packed = _pack(msg, crypto) assert msg.header.pkt_type == enum.PacketType.Message assert msg.header.flags.msg_type == enum.MessageType.PowerOff assert msg.protected_payload.liveid == 'FD00112233FFEE66' assert len(packed) == len(packets[bin_name]) assert packed == packets[bin_name]