docs icon indicating copy to clipboard operation
docs copied to clipboard

Update Unit Testing Docs - Note That Mocked Resource Properties must be Camel Case

Open phillipedwards opened this issue 3 years ago • 0 comments

Hello!

  • Vote on this issue by adding a 👍 reaction
  • If you want to implement this feature, comment to let us know (we'll work with you on design, scheduling, etc.)

Issue details

As a developer when building unit tests, I want to mock resources and their outputs to allow me to test my code without interacting with external systems (cloud providers...). This is likely to impact python developers most, but mocked resource properties must conform to the Pulumi names, which are camel case!

Affected area/feature

In the unit testing docs explicitly note that mocked resource properties must be camel case. This can especially with be confusing with Python progras because Python properites are snake case.

Example of camel case properties in a python program can be found here: https://github.com/pulumi/examples/blob/601b16b78aa88d5e14df554d0747b2bc42623cf3/testing-unit-py/test_ec2.py#L10-L11

phillipedwards avatar Oct 26 '21 18:10 phillipedwards