Пример #1
0
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'))
Пример #2
0
 def updateGroup(self, groupId: List[bytes], name: str, members: List[str],
                 avatar: str):
     return new_method_call(self, 'updateGroup', 'aysass',
                            (groupId, name, members, avatar))
Пример #3
0
 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)
Пример #4
0
 def GoTo(self, arg0):
     return new_method_call(self, 'GoTo', 'o',
                            (arg0,))
Пример #5
0
 def RemoveTrack(self, arg0):
     return new_method_call(self, 'RemoveTrack', 'o',
                            (arg0,))
Пример #6
0
 def Previous(self):
     return new_method_call(self, 'Previous')
Пример #7
0
 def setContactName(self, number: str, name: str):
     return new_method_call(self, 'setContactName', 'ss', (number, name))
Пример #8
0
 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))
Пример #9
0
 def OpenUri(self, arg0):
     return new_method_call(self, 'OpenUri', 's',
                            (arg0,))
Пример #10
0
 def Seek(self, arg0):
     return new_method_call(self, 'Seek', 'x',
                            (arg0,))
Пример #11
0
 def PlayPause(self):
     return new_method_call(self, 'PlayPause')
Пример #12
0
 def Play(self):
     return new_method_call(self, 'Play')
Пример #13
0
 def Stop(self):
     return new_method_call(self, 'Stop')
Пример #14
0
 def Next(self):
     return new_method_call(self, 'Next')
Пример #15
0
 def sendEndSessionMessage(self, recipients: List[str]):
     return new_method_call(self, 'sendEndSessionMessage', 'as',
                            (recipients, ))
Пример #16
0
 def sendGroupMessage(self, message: str, attachments: List[str],
                      groupId: List[bytes]):
     return new_method_call(self, 'sendGroupMessage', 'sasay',
                            (message, attachments, groupId))
Пример #17
0
 def SetPosition(self, arg0, arg1):
     return new_method_call(self, 'SetPosition', 'ox',
                            (arg0, arg1))
Пример #18
0
 def getContactName(self, number: str):
     return new_method_call(self, 'getContactName', 's', (number, ))
Пример #19
0
 def GetTracksMetadata(self, arg0):
     return new_method_call(self, 'GetTracksMetadata', 'ao',
                            (arg0,))
Пример #20
0
 def getGroupName(self, groupId: List[bytes]):
     return new_method_call(self, 'getGroupName', 'ay', (groupId, ))
Пример #21
0
 def AddTrack(self, arg0, arg1, arg2):
     return new_method_call(self, 'AddTrack', 'sob',
                            (arg0, arg1, arg2))