272539105f949ac28e37adac0474ac28d65256e0,tests/test_bootstrap.py,TestBootstrap,test_from_config_file,#TestBootstrap#Any#,50
Before Change
def test_from_config_file(self, mock_detect):
Test with configuration file.
components = ["browser", "conversation", "script"]
with tempfile.NamedTemporaryFile() as fp:
for comp in components:
fp.write("{}:\n".format(comp).encode("utf-8"))
fp.flush()
self.hass = bootstrap.from_config_file(fp.name)
components.append("group")
assert sorted(components) == sorted(self.hass.config.components)
def test_handle_setup_circular_dependency(self):
After Change
files = {
"config.yaml": "".join(
"{}:\n".format(comp)
for comp in components
)
}
with mock.patch("os.path.isfile", mock.Mock(return_value=True)), \
mock.patch("os.access", mock.Mock(return_value=True)), \
patch_yaml_files(files, True):
self.hass = bootstrap.from_config_file("config.yaml")
components.append("group")
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: home-assistant/home-assistant
Commit Name: 272539105f949ac28e37adac0474ac28d65256e0
Time: 2016-10-17
Author: rob.capellini@gmail.com
File Name: tests/test_bootstrap.py
Class Name: TestBootstrap
Method Name: test_from_config_file
Project Name: home-assistant/home-assistant
Commit Name: 272539105f949ac28e37adac0474ac28d65256e0
Time: 2016-10-17
Author: rob.capellini@gmail.com
File Name: tests/components/test_init.py
Class Name: TestComponentsCore
Method Name: test_reload_core_with_wrong_conf
Project Name: home-assistant/home-assistant
Commit Name: 272539105f949ac28e37adac0474ac28d65256e0
Time: 2016-10-17
Author: rob.capellini@gmail.com
File Name: tests/components/test_init.py
Class Name: TestComponentsCore
Method Name: test_reload_core_conf