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