localstack / airspeed

A Python implementation of Velocity templates, tailored to VTL in AWS (e.g., API Gateway, AppSync)
Other
2 stars 1 forks source link

add contains and toString #13

Closed calvernaz closed 1 year ago

calvernaz commented 1 year ago

Adds toString and contains methods. These two have been overridden in community and will be removed once this is merged

calvernaz commented 1 year ago

/

Nice! Thanks for adding this @calvernaz , and for adding the snapshot test. 🎉

Looks like there's only a small discrepancy - I guess we could create a custom serializer to convert dict objects to string.. (VTL uses the Java notation of Map.toString)

>> match key: render-result-1
  (~) / '{k1=v1, k2=v2}' → "{'k1': 'v1', 'k2': 'v2'}" ... (expected → actual)

good catch, have a fix for it, hopefully is good enough