Test fixes (#22911)

* Fix light tests [skip ci]

* Fix tests/common

* Fix some mqtt tests [skip ci]

* Fix tests and component manifests which have only one platform

* Fix more tests and manifests

* Fix demo/notify tests

* Rollback test for demo.geo_location
This commit is contained in:
Paulus Schoutsen authored and GitHub committed 2019-04-08 23:16:55 -07:00
1 parent 1a05f7b04d
commit 590eead128
20 files changed
+68 -48

No files matched your search

+4 -4
View File
@@ -374,10 +374,10 @@ class TestLight(unittest.TestCase):
return True
return real_isfile(path)
def _mock_open(path):
def _mock_open(path, *args, **kwargs):
if path == user_light_file:
return StringIO(profile_data)
return real_open(path)
return real_open(path, *args, **kwargs)
profile_data = "id,x,y,brightness\n" +\
"group.all_lights.default,.4,.6,99\n"
@@ -412,10 +412,10 @@ class TestLight(unittest.TestCase):
return True
return real_isfile(path)
def _mock_open(path):
def _mock_open(path, *args, **kwargs):
if path == user_light_file:
return StringIO(profile_data)
return real_open(path)
return real_open(path, *args, **kwargs)
profile_data = "id,x,y,brightness\n" +\
"group.all_lights.default,.3,.5,200\n" +\