def customUploadHelper(self, return_func):
    q = Queue()

    def upload_open(path, context):
        q.put('called')
        return return_func(path)
    self.clientServerUploadOptions({}, server_kwargs={'upload_open': upload_open})
    self.assertEqual(q.get(True, 1), 'called')
def customUploadHelper(self, return_func):
    q = Queue()

    def upload_open(path, context):
        q.put('called')
        return return_func(path)
    self.clientServerUploadOptions({}, server_kwargs={'upload_open': upload_open})
    self.assertEqual(q.get(True, 1), 'called')