RFC: Call services directly (#18720)

* Call services directly

* Simplify

* Type

* Lint

* Update name

* Fix tests

* Catch exceptions in HTTP view

* Lint

* Handle ServiceNotFound in API endpoints that call services

* Type

* Don't crash recorder on non-JSON serializable objects
This commit is contained in:
Paulus Schoutsen authored and Pascal Vizeli committed 2018-11-30 21:28:35 +01:00
1 parent 53cbb28926
commit df21dd21f2
30 files changed
+312 -186

No files matched your search

+1 -1
View File
@@ -947,7 +947,7 @@ class TestZWaveServices(unittest.TestCase):
assert self.zwave_network.stop.called
assert len(self.zwave_network.stop.mock_calls) == 1
assert mock_fire.called
assert len(mock_fire.mock_calls) == 2
assert len(mock_fire.mock_calls) == 1
assert mock_fire.mock_calls[0][1][0] == const.EVENT_NETWORK_STOP
def test_rename_node(self):