def test_init_overwrite(self):
    with open(config.CLOUDIFY_CONFIG_PATH) as f:
        conf = yaml.safe_load(f.read())
    self.assertFalse(conf['colors'])
    with open(config.CLOUDIFY_CONFIG_PATH, 'w') as f:
        conf['colors'] = True
        f.write(yaml.safe_dump(conf))
    cfy.invoke('init -r')
    with open(config.CLOUDIFY_CONFIG_PATH) as f:
        conf = yaml.safe_load(f.read())
    self.assertTrue(conf['colors'])
def test_init_overwrite(self):
    with open(config.CLOUDIFY_CONFIG_PATH) as f:
        conf = yaml.safe_load(f.read())
    self.assertFalse(conf['colors'])
    with open(config.CLOUDIFY_CONFIG_PATH, 'w') as f:
        conf['colors'] = True
        f.write(yaml.safe_dump(conf))
    cfy.invoke('init -r')
    with open(config.CLOUDIFY_CONFIG_PATH) as f:
        conf = yaml.safe_load(f.read())
    self.assertTrue(conf['colors'])