예제 #1
0
    def setUp(self):
        gajim.interface.roster = roster_window.RosterWindow()

        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))
예제 #2
0
    def setUp(self):
        gajim.interface = MockInterface()
        self.roster = roster_window.RosterWindow()

        self.C_NAME = roster_window.C_NAME
        self.C_TYPE = roster_window.C_TYPE
        self.C_JID = roster_window.C_JID
        self.C_ACCOUNT = roster_window.C_ACCOUNT

        # Add after creating RosterWindow
        # We want to test the filling explicitly
        for acc in contacts:
            gajim.connections[acc] = MockConnection(acc)
예제 #3
0
    def setUp(self):
        gajim.interface = MockInterface()

        self.C_NAME = roster_window.C_NAME
        self.C_TYPE = roster_window.C_TYPE
        self.C_JID = roster_window.C_JID
        self.C_ACCOUNT = roster_window.C_ACCOUNT

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

        for acc in contacts:
            gajim.connections[acc] = MockConnection(acc)
            gajim.contacts.add_account(acc)
예제 #4
0
    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))
예제 #5
0
    def run(self):
        self.roster = roster_window.RosterWindow()

        #fill the roster contacts...
        #self.roster._before_fill()
        #for account in gajim.connections:
        #    gajim.connections[account].load_roster_from_db()
        #self.roster._after_fill()

        #connect here possibly by using glib timeout_add

        #connect to idle queue of gcm connector?

        import config
        import dialogs
        if not config.existsConfigOption('gcmandroidId'):
            dialogs.GenerateGCMWindow()
        else:
            mtalkconn.start_gcm(self)