Allow put as method (#8004)

This commit is contained in:
Fabian Affolter authored and Paulus Schoutsen committed 2017-06-12 22:27:25 -07:00
1 parent 2bf781185f
commit 843f8ce9ee
2 files changed
+24 -14

No files matched your search

+4 -2
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."""