Exemplo n.º 1
0
    def test_to_yaml_with_defaults(self):
        config = TwilioConfiguration()

        data = {}
        config.to_yaml(data, True)

        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")
Exemplo n.º 2
0
    def test_to_yaml_with_defaults(self):
        config = TwilioConfiguration()

        data = {}
        config.to_yaml(data, True)

        self.assertEqual(data['bot'], 'bot')
        self.assertEqual(data['bot_selector'],
                         "programy.clients.client.DefaultBotSelector")
        self.assertEqual(data['renderer'],
                         "programy.clients.render.text.TextRenderer")
Exemplo n.º 3
0
    def test_to_yaml_with_defaults(self):
        config = TwilioConfiguration()

        data = {}
        config.to_yaml(data, True)

        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'])