@pytest.mark.skipif((sys.version_info < (3, 8)), reason='only for python versions that support asyncio.run')
def test_resolver_async():
    app = AppSyncResolver()
    mock_event = {'typeName': 'Customer', 'fieldName': 'field', 'arguments': {}}

    @app.resolver(field_name='field')
    async def get_async():
        (await asyncio.sleep(0.0001))
        return 'value'
    mock_context = LambdaContext()
    result = app.resolve(mock_event, mock_context)
    assert (asyncio.run(result) == 'value')
@pytest.mark.skipif((sys.version_info < (3, 8)), reason='only for python versions that support asyncio.run')
def test_resolver_async():
    app = AppSyncResolver()
    mock_event = {'typeName': 'Customer', 'fieldName': 'field', 'arguments': {}}

    @app.resolver(field_name='field')
    async def get_async():
        (await asyncio.sleep(0.0001))
        return 'value'
    mock_context = LambdaContext()
    result = app.resolve(mock_event, mock_context)
    assert (asyncio.run(result) == 'value')