Tesla-API icon indicating copy to clipboard operation
Tesla-API copied to clipboard

Unit tests will never work on our CI

Open JagCesar opened this issue 7 years ago • 2 comments

Our unit tests require valid credentials to be successful. How can we work around that?

Mocked data objects maybe? But then we have to automate the creation of those objects if Tesla desires to update the JSON object returned for any endpoint. 🤔

JagCesar avatar Mar 14 '18 23:03 JagCesar

But at that point, they'll have to release a new version of their app! I think you're perfectly safe with mocking all the endpoints. You can just anonymize previous requests or just have the fields that you care about :)

westerlund avatar Mar 16 '18 07:03 westerlund

@westerlund That's true. Let's start out that way, and then see where it takes us :)

JagCesar avatar Mar 16 '18 16:03 JagCesar