예제 #1
0
 def get_client_configuration(self):
     config = XmppConfiguration()
     config._server = "Server"
     config._port = 8080
     config._xep_0030 = True
     config._xep_0004 = True
     config._xep_0060 = True
     config._xep_0199 = True
     return config
예제 #2
0
 def get_client_configuration(self):
     config = XmppConfiguration()
     config._server = "Server"
     config._port = 8080
     config._xep_0030 = True
     config._xep_0004 = True
     config._xep_0060 = True
     config._xep_0199 = True
     return config
예제 #3
0
    def test_register_plugins(self):
        bot_client = MockBotClient()
        xmpp_client = MockXmppClient(bot_client, "userid", "password")

        client_configuration = XmppConfiguration()
        client_configuration._xep_0030 = True
        client_configuration._xep_0004 = True
        client_configuration._xep_0060 = True
        client_configuration._xep_0199 = True

        xmpp_client.register_xep_plugins(client_configuration)

        self.assertTrue(bool("xep_0030" in xmpp_client.registered_plugins))
        self.assertTrue(bool("xep_0004" in xmpp_client.registered_plugins))
        self.assertTrue(bool("xep_0060" in xmpp_client.registered_plugins))
        self.assertTrue(bool("xep_0199" in xmpp_client.registered_plugins))
예제 #4
0
    def test_register_plugins(self):
        bot_client = MockBotClient()
        xmpp_client = MockXmppClient(bot_client, "userid", "password")

        client_configuration = XmppConfiguration()
        client_configuration._xep_0030 = True
        client_configuration._xep_0004 = True
        client_configuration._xep_0060 = True
        client_configuration._xep_0199 = True

        xmpp_client.register_xep_plugins(client_configuration)

        self.assertTrue(bool("xep_0030" in xmpp_client.registered_plugins))
        self.assertTrue(bool("xep_0004" in xmpp_client.registered_plugins))
        self.assertTrue(bool("xep_0060" in xmpp_client.registered_plugins))
        self.assertTrue(bool("xep_0199" in xmpp_client.registered_plugins))