예제 #1
0
    def test_to_yaml_with_defaults(self):
        config = XmppConfiguration()

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

        self.assertEqual(data['server'], "talk.google.com")
        self.assertEqual(data['port'], 5222)
        self.assertEqual(data['xep_0030'], True)
        self.assertEqual(data['xep_0004'], True)
        self.assertEqual(data['xep_0060'], True)
        self.assertEqual(data['xep_0199'], 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'])
예제 #2
0
    def test_to_yaml_with_defaults(self):
        config = XmppConfiguration()

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

        self.assertEquals(data['server'], "talk.google.com")
        self.assertEquals(data['port'], 5222)
        self.assertEquals(data['xep_0030'], True)
        self.assertEquals(data['xep_0004'], True)
        self.assertEquals(data['xep_0060'], True)
        self.assertEquals(data['xep_0199'], 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")
예제 #3
0
    def test_to_yaml_with_defaults(self):
        config = XmppConfiguration()

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

        self.assertEquals(data['server'], "talk.google.com")
        self.assertEquals(data['port'], 5222)
        self.assertEquals(data['xep_0030'], True)
        self.assertEquals(data['xep_0004'], True)
        self.assertEquals(data['xep_0060'], True)
        self.assertEquals(data['xep_0199'], 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")