Default config dir is now working_dir/config
parent
cda04b7ece
commit
9c4111403e
|
@ -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. """
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue