def test_amplify_resolver():
    mock_event = load_event('appSyncResolverEvent.json')
    app = AppSyncResolver()

    @app.resolver(type_name='Merchant', field_name='locations')
    def get_location(page: int, size: int, name: str):
        assert (app.current_event is not None)
        assert isinstance(app.current_event, AppSyncResolverEvent)
        assert (page == 2)
        assert (size == 1)
        return name

    def handler(event, context):
        return app.resolve(event, context)
    result = handler(mock_event, {})
    assert (result == 'value')
def test_amplify_resolver():
    mock_event = load_event('appSyncResolverEvent.json')
    app = AppSyncResolver()

    @app.resolver(type_name='Merchant', field_name='locations')
    def get_location(page: int, size: int, name: str):
        assert (app.current_event is not None)
        assert isinstance(app.current_event, AppSyncResolverEvent)
        assert (page == 2)
        assert (size == 1)
        return name

    def handler(event, context):
        return app.resolve(event, context)
    result = handler(mock_event, {})
    assert (result == 'value')