def test_default_filename(self): from lazyconfig import LazyConfig lc = LazyConfig() lc.load() self.assertTrue(lc.loaded) self.assertTrue(lc.filename is not None) self.assertTrue(lc.filename.endswith('config.yaml')) self.assertEquals(lc.config.foo.bar, 'test')
def test_custom_filename(self): from lazyconfig import LazyConfig lc = LazyConfig() lc.set_config_file('tests/data/example.yaml') lc.load() self.assertTrue(lc.loaded) self.assertTrue(lc.config is not None) self.assertEquals(lc.filename, 'tests/data/example.yaml')