HelloThisIsFlo / Appdaemon-Test-Framework

Clean, human-readable tests for Appdaemon
https://hellothisisflo.github.io/Appdaemon-Test-Framework/
MIT License
45 stars 19 forks source link

Support get_state namespaces #68

Open bogdal opened 2 years ago

bogdal commented 2 years ago

This PR introduces namespaces to the mocked states. It helps to test applications that use User Definied Namespaces as persistent storage.

An example:

given_that.state_of("light.kitchen", namespace="storage").is_set_to(
    'on', attributes={"last_used_preset": "dark"}
)

...
self.get_state("light.kitchen", attribute="last_used_preset", namespace="storage")
HelloThisIsFlo commented 2 years ago

Hi Adam,

Thanks for your PR!

Unfortunately, I have a lot of things going on at the moment and I have no time to maintain this repo 😕. I do plan to catch up at some point, but I don't exactly know when that will happen, it's not at the top of my priority list at the moment.

Best, Flo

bogdal commented 2 years ago

Hey Florian,

thanks for letting me know, I appreciate it. I totally understand this situation. See you sooner or later 👍