def test_to_yaml_with_defaults(self): config = ViberConfiguration() data = {} config.to_yaml(data, True) self.assertEquals(data['name'], "ProgramY") self.assertEquals(data['avatar'], 'http://666666666.ngrok.io/programy.png') self.assertEquals(data['webhook'], 'http://666666666.ngrok.io/rest/v1.0/ask') self.assertEquals(data['bot'], 'bot') self.assertEquals(data['license_keys'], "./config/license.keys") self.assertEquals(data['bot_selector'], "programy.clients.client.DefaultBotSelector") self.assertEquals(data['renderer'], "programy.clients.render.text.TextRenderer")
def test_to_yaml_with_defaults(self): config = ViberConfiguration() data = {} config.to_yaml(data, True) self.assertEqual(data['name'], "Program-Y") self.assertEqual(data['avatar'], 'http://127.0.0.1/programy.png') self.assertEqual(data['webhook'], 'https://127.0.0.1/api/viber/v1.0/ask') self.assertEqual(data['bot_selector'], "programy.clients.botfactory.DefaultBotSelector") self.assertEqual(data['renderer'], "programy.clients.render.text.TextRenderer") self.assertTrue('bots' in data) self.assertTrue('bot' in data['bots']) self.assertEqual(data['bot_selector'], "programy.clients.botfactory.DefaultBotSelector") self.assertTrue('brains' in data['bots']['bot']) self.assertTrue('brain' in data['bots']['bot']['brains'])