Skip to content

Instantly share code, notes, and snippets.

@to-mc
to-mc / test.py
Last active February 3, 2022 15:13
@pytest.mark.asyncio
async def test_resolver_async():
# GIVEN
app = AppSyncResolver()
mock_event = {"typeName": "Customer", "fieldName": "field", "arguments": {}}
# Note: this function would be defined in another module in an actual serverless application, and imported.
# Its structured this way here as we're testing the framework itself.
@app.resolver(field_name="field")