Prevent partial custom component overlays (#21070)

* Prevent partial custom component overlays

* Fix tests
This commit is contained in:
Paulus Schoutsen 2019-02-21 00:41:36 -08:00 committed by Pascal Vizeli
parent 73099caede
commit 2435456248
4 changed files with 44 additions and 16 deletions

View file

@ -454,6 +454,7 @@ class MockModule:
async_setup_entry=None, async_unload_entry=None,
async_migrate_entry=None):
"""Initialize the mock module."""
self.__name__ = 'homeassistant.components.{}'.format(domain)
self.DOMAIN = domain
self.DEPENDENCIES = dependencies or []
self.REQUIREMENTS = requirements or []