

def test_async_run_once(self):
    job = self.mock.Mock(return_value=None)
    t = self.service.getTask(TestDBusSessionTask)
    ft = t.asyncRun(job)
    ft.result()
    self.assertEqual(job.call_count, 1)

dataset/ETHPy150Open facebook/sparts/tests/tasks/test_dbus.py TestDBus.test_async_run_once/original