Esempio n. 1
0
    def setUp(self):
        app.interface = MockInterface()

        self.C_NAME = roster_window.Column.NAME
        self.C_TYPE = roster_window.Column.TYPE
        self.C_JID = roster_window.Column.JID
        self.C_ACCOUNT = roster_window.Column.ACCOUNT

        # Add after creating RosterWindow
        # We want to test the filling explicitly
        app.contacts = contacts_module.LegacyContactsAPI()
        app.connections = {}
        self.roster = roster_window.RosterWindow(app.app)

        for acc in contacts:
            app.connections[acc] = MockConnection(acc)
            app.contacts.add_account(acc)
    def setUp(self):

        gajim.connections = {}
        gajim.contacts = contacts_module.LegacyContactsAPI()
        gajim.interface.roster = roster_window.RosterWindow()
        gajim.plugin_manager = plugins.PluginManager()
        gajim.logger = MockLogger()
        caps_cache.initialize(gajim.logger)

        for acc in contacts:
            gajim.connections[acc] = MockConnection(acc)

            gajim.interface.roster.fill_contacts_and_groups_dicts(contacts[acc],
                    acc)
            gajim.interface.roster.add_account(acc)
            gajim.interface.roster.add_account_contacts(acc)

        self.assertEqual(0, len(notify.notifications))