def newMapWidgetInContainer(self):
     """
     Return a new SVGMap
     """
     enc = ircweb.IRCContainer(None, testUser(cleanStore()))
     enc.setFragmentParent(self)
     return enc
 def newMapWidgetInContainer(self):
     """
     Return a new SVGMap
     """
     enc = ircweb.IRCContainer(None, testUser(cleanStore()))
     enc.setFragmentParent(self)
     return enc
Esempio n. 3
0
 def newAccountManager(self, nick=None, autoHide=None):
     """
     Return a new Account Manager
     """
     user = testUser(cleanStore())
     if nick is not None:
         user.nick = nick
     am = ircweb.AccountManager(MockMinAccountManager(), None, user)
     am.setFragmentParent(self)
     return am
 def newAccountManager(self, nick=None, autoHide=None):
     """
     Return a new Account Manager
     """
     user = testUser(cleanStore())
     if nick is not None:
         user.nick = nick
     am = ircweb.AccountManager(MockMinAccountManager(), None, user)
     am.setFragmentParent(self)
     return am
Esempio n. 5
0
    def newContainer(self, ):
        """
        Return a new IRC Container with mock conversations for the ids given
        """
        user = testUser(cleanStore())
        # XXX warning - livetrial does not provide test isolation!
        # setting instance variables can bite you in the ass.  If this
        # method is called first from every test, life is fine, but if
        # generateConversation is called without calling this first,
        # behavior is UNDEFINED.
        self.irc = ircweb.IRCContainer(MockMinAccountManager(), user)
        self.irc.setFragmentParent(self)

        return self.irc
    def newContainer(self,):
        """
        Return a new IRC Container with mock conversations for the ids given
        """
        user = testUser(cleanStore())
        # XXX warning - livetrial does not provide test isolation!
        # setting instance variables can bite you in the ass.  If this
        # method is called first from every test, life is fine, but if
        # generateConversation is called without calling this first,
        # behavior is UNDEFINED.
        self.irc = ircweb.IRCContainer(MockMinAccountManager(), user)
        self.irc.setFragmentParent(self)

        return self.irc
    def newFileChooser(self, labels=None):
        """
        Return a new Signup widget
        @param labels: create ChooserIcons with the given labels as well
        """
        # if labels was given, create some test files.  FileChooser
        # will make ChooserIcons out of these during rendering
        self.store = cleanStore()
        self.user = testUser(self.store)
        if labels is not None:
            for label in labels:
                fileitem = data.FileMeta(store=self.store, user=self.user, filename=label, mimeType=u"text/plain")

        self.fc = gmtools.FileChooser(self.user)
        self.fc.setFragmentParent(self)

        return self.fc
Esempio n. 8
0
    def newFileChooser(self, labels=None):
        """
        Return a new Signup widget
        @param labels: create ChooserIcons with the given labels as well
        """
        # if labels was given, create some test files.  FileChooser
        # will make ChooserIcons out of these during rendering
        self.store = cleanStore()
        self.user = testUser(self.store)
        if labels is not None:
            for label in labels:
                fileitem = data.FileMeta(store=self.store,
                                         user=self.user,
                                         filename=label,
                                         mimeType=u'text/plain')

        self.fc = gmtools.FileChooser(self.user)
        self.fc.setFragmentParent(self)

        return self.fc