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