def test_to_dict(self):
        from furious.async import Async

        task_args = {'other': 'zzz', 'nested': 1}
        headers = {'some': 'thing', 'fun': 1}
        options = {'headers': headers, 'task_args': task_args, 'id': 'me',
                   'context_id': None, 'parent_id': 'parentid'}

        job = Async('nonexistant', **options.copy())

        options['job'] = ('nonexistant', None, None)
        options['_recursion'] = {'current': 0, 'max': 100}
        options['_type'] = 'furious.async.Async'

        self.assertEqual(options, job.to_dict())
Reads and decodes a single packet
dataset/ETHPy150Open Workiva/furious/furious/tests/test_async.py/TestAsync.test_to_dict--crossover with--dataset/ETHPy150Open mbedmicro/pyOCD/pyOCD/pyDAPAccess/dap_access_usb.py/DAPAccessUSB._read_packet