Comment 1 for bug 1322080

Revision history for this message
VĂ­ctor R. Ruiz (vrruiz) wrote :

lp:~vrruiz/gallery-app/test-share-photo has the code which shares a photo with Facebook. The test mocks the friends-dispatcher service to capture the call to the Upload method, which is defined as:

    @dbus.service.method(DBUS_INTERFACE,
                         in_signature='sss',
                         out_signature='s',
                         async_callbacks=('success','failure'))
    def Upload(self, account_id, uri, description, success=STUB, failure=STUB):

When Friends calls to the Upload service, it does it asynchronously, expecting either success or failure functions to be called back after the photo has been posted. To mock the service, I've used python-dbusmock, which currently doesn't support callbacks, so the test doesn't work correctly.