1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Allow put as method (#8004)

This commit is contained in:
Fabian Affolter
2017-06-13 07:27:25 +02:00
committed by Paulus Schoutsen
parent 2bf781185f
commit 843f8ce9ee
2 changed files with 24 additions and 14 deletions

View File

@@ -97,11 +97,13 @@ class TestRestSwitch:
"""Setup things to be run when tests are started."""
self.hass = get_test_home_assistant()
self.name = 'foo'
self.method = 'post'
self.resource = 'http://localhost/'
self.body_on = Template('on', self.hass)
self.body_off = Template('off', self.hass)
self.switch = rest.RestSwitch(self.hass, self.name, self.resource,
self.body_on, self.body_off, None, 10)
self.switch = rest.RestSwitch(
self.hass, self.name, self.resource, self.method, self.body_on,
self.body_off, None, 10)
def teardown_method(self):
"""Stop everything that was started."""