示例#1
0
 def test_get_config_data_loads_yaml_data(self):
     fake_config = {
         factory.make_name('key'): factory.make_name('value')
     }
     with open(self.regiond_path, 'w') as stream:
         stream.write(yaml.safe_dump(fake_config))
     self.assertEquals(fake_config, snappy.get_config_data())
示例#2
0
 def test_get_config_data_returns_empty_dict_when_config_empty(self):
     open(self.regiond_path, 'w').close()
     self.assertEquals({}, snappy.get_config_data())
示例#3
0
 def test_get_config_data_returns_empty_dict_when_no_config(self):
     self.assertEquals({}, snappy.get_config_data())