Default config dir is now working_dir/config

pull/12/head
Paulus Schoutsen 2014-11-25 23:15:18 -08:00
parent cda04b7ece
commit 9c4111403e
2 changed files with 4 additions and 3 deletions

View File

@ -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. """

View File

@ -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):