Replies: 5 comments 4 replies
-
Thanks for all that information. This helps me a lot. I get my car on Friday and will look into it in the weekend 😄 I greatly appreciate that we can help each other. I have changed somethings in the underlying |
Beta Was this translation helpful? Give feedback.
-
Would you like to have access to my MyT account? |
Beta Was this translation helpful? Give feedback.
-
Sure, I'd be happy to help
Op za 27 mrt. 2021 16:47 schreef Simon Hansen ***@***.***>:
… Not for writing these types of tests.
But i made need your help with some other things soon. 😊
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#13 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFAH6ZO3YZR6PYBSQAQHF5LTFX423ANCNFSM4ZUL2S5Q>
.
|
Beta Was this translation helpful? Give feedback.
-
Hi @DurgNomis-drol , I recently switched jobs at work and was able to gain some experience in unit and integration testing myself. |
Beta Was this translation helpful? Give feedback.
-
Hey guys, as you may have noticed, i have been spending a lot of time on this project the last month. Right now I have alot of things in my personal life, and because i am the only one right now maintaining this project (Though @CM000n are willing to help write tests). I have decided not to be the one to submit the PR for getting this into CORE. But if someone else is willing too do it they are more the welcome and i will make them a maintainer in this Repo. I will still be actively trying to fix bugs. I will how ever do some work on implementing statistics sensors as i feel this feature is more important and very useful. PR's are more the welcome! Sorry for not being upfront sooner 😃 Hopefully i will find more time in the coming months again. Have a great day! |
Beta Was this translation helpful? Give feedback.
-
In order to create tests for the HA integration, we will need fixtures, or examples of the data returned by the methods in
mytoyota
. Here is an example from my Mazda integration. It looks likeMyT.gather_information
is the only method that the HA integration uses frommytoyota
. @DurgNomis-drol Can you please provide a sample response for thegather_information
method with any personal info censored?Once we have the fixture(s), we can write the tests. The tests will create an invisible ("mock") instance of the Home Assistant application and initialize the Toyota integration, and then each test will verify that a specific part of the integration is working correctly. We will need to test the initialization of the integration, the config flow, and the entity classes (sensor, device tracker). By using the fixtures, we will be able to test the integration without actually connecting to Toyota servers.
Because the tests initialize an instance of HA, they will need to be run from within the
home-assistant/core
codebase. We can probably store them in this repo for now, but in order to run the tests, they will need to be copied to the proper location inhome-assistant/core
.Beta Was this translation helpful? Give feedback.
All reactions