diff --git a/homeassistant/__init__.py b/homeassistant/__init__.py index 39980937bc0..7b836af8d05 100644 --- a/homeassistant/__init__.py +++ b/homeassistant/__init__.py @@ -63,7 +63,7 @@ class HomeAssistant(object): self.services = ServiceRegistry(self.bus, pool) self.states = StateMachine(self.bus) - self.config_dir = os.getcwd() + self.config_dir = os.path.join(os.getcwd(), 'config') def get_config_path(self, path): """ Returns path to the file within the config dir. """ diff --git a/test/test_core.py b/test/test_core.py index 1bb08365380..91a56df14fa 100644 --- a/test/test_core.py +++ b/test/test_core.py @@ -34,9 +34,10 @@ class TestHomeAssistant(unittest.TestCase): def test_get_config_path(self): """ Test get_config_path method. """ - self.assertEqual(os.getcwd(), self.hass.config_dir) + self.assertEqual(os.path.join(os.getcwd(), "config"), + self.hass.config_dir) - self.assertEqual(os.path.join(os.getcwd(), "test.conf"), + self.assertEqual(os.path.join(os.getcwd(), "config", "test.conf"), self.hass.get_config_path("test.conf")) def test_block_till_stoped(self):