def test_object_wrong_method_call(dbus_service): """ Try to call an inexistent method and verify that an error is returned. """ object_path = 'com.example.object' addr = DBusAddress('/path', object_path) dbus_service.listen() conn = connect_and_authenticate() with pytest.raises(DBusErrorResponse): conn.send_and_get_reply(new_method_call(addr, 'some_method'))
def updateGroup(self, groupId: List[bytes], name: str, members: List[str], avatar: str): return new_method_call(self, 'updateGroup', 'aysass', (groupId, name, members, avatar))
def call(self, method: str, signature: str, *body: Any) -> Any: msg = new_method_call(self, method, signature, body) return self.send_and_get_reply(msg)
def GoTo(self, arg0): return new_method_call(self, 'GoTo', 'o', (arg0,))
def RemoveTrack(self, arg0): return new_method_call(self, 'RemoveTrack', 'o', (arg0,))
def Previous(self): return new_method_call(self, 'Previous')
def setContactName(self, number: str, name: str): return new_method_call(self, 'setContactName', 'ss', (number, name))
def sendMessage(self, message: str, attachments: List[str], recip: R): signature = "sass" if isinstance(recip, str) else "sasas" return new_method_call(self, 'sendMessage', signature, (message, attachments, recip))
def OpenUri(self, arg0): return new_method_call(self, 'OpenUri', 's', (arg0,))
def Seek(self, arg0): return new_method_call(self, 'Seek', 'x', (arg0,))
def PlayPause(self): return new_method_call(self, 'PlayPause')
def Play(self): return new_method_call(self, 'Play')
def Stop(self): return new_method_call(self, 'Stop')
def Next(self): return new_method_call(self, 'Next')
def sendEndSessionMessage(self, recipients: List[str]): return new_method_call(self, 'sendEndSessionMessage', 'as', (recipients, ))
def sendGroupMessage(self, message: str, attachments: List[str], groupId: List[bytes]): return new_method_call(self, 'sendGroupMessage', 'sasay', (message, attachments, groupId))
def SetPosition(self, arg0, arg1): return new_method_call(self, 'SetPosition', 'ox', (arg0, arg1))
def getContactName(self, number: str): return new_method_call(self, 'getContactName', 's', (number, ))
def GetTracksMetadata(self, arg0): return new_method_call(self, 'GetTracksMetadata', 'ao', (arg0,))
def getGroupName(self, groupId: List[bytes]): return new_method_call(self, 'getGroupName', 'ay', (groupId, ))
def AddTrack(self, arg0, arg1, arg2): return new_method_call(self, 'AddTrack', 'sob', (arg0, arg1, arg2))