Rewrite the tests #126
Replies: 2 comments 1 reply
-
I created test_home_cant_be_set_to_auto_when_home_does_not_support_geofencing() |
Beta Was this translation helpful? Give feedback.
-
I do not like the my_tado tests neither, and the reasons are the same @erwindouna! That's the reason I introduced the responses dependency and mocked the actual responses instead of the result a method. The downside of this, it tests too many thinks IMHO, for instance the _configure_url method or the request handling. It is no red flag, but it would be nice to abstract hat away too, and do explicit testing for this functionality too. In my opinion tests should ensure, that the intended use cases of a method will work, and make the usage of the library visible (I do like TDD a lot :)). |
Beta Was this translation helpful? Give feedback.
-
I'd be very much in favor of rewriting the test for the following reasons:
It attempts to mock, yet it doesn't assert or check any of the new states. It's crucial we test thoroughly the features we offer.
This can be replaced, by mechanisms from asynctado:
Beta Was this translation helpful? Give feedback.
All reactions