Example #1
0
 def test_distinctSources(self):
     """
     Test that any particular message source is only returned once from
     L{getMessageSources}.
     """
     s = Store()
     _addMessageSource(s, u"a")
     _addMessageSource(s, u"a")
     self.assertEquals(list(getMessageSources(s)), [u"a"])
Example #2
0
 def test_distinctSources(self):
     """
     Test that any particular message source is only returned once from
     L{getMessageSources}.
     """
     s = Store()
     _addMessageSource(s, u"a")
     _addMessageSource(s, u"a")
     self.assertEquals(list(getMessageSources(s)), [u"a"])
Example #3
0
 def test_sourceTracking(self):
     """
     Test that message sources added with L{addMessageSource} can be
     retrieved with L{getMessageSources} in alphabetical order.
     """
     s = Store()
     _addMessageSource(s, u"one")
     _addMessageSource(s, u"two")
     _addMessageSource(s, u"three")
     self.assertEquals(list(getMessageSources(s)),
                       [u"one", u"three", u"two"])
Example #4
0
 def test_sourceTracking(self):
     """
     Test that message sources added with L{addMessageSource} can be
     retrieved with L{getMessageSources} in alphabetical order.
     """
     s = Store()
     _addMessageSource(s, u"one")
     _addMessageSource(s, u"two")
     _addMessageSource(s, u"three")
     self.assertEquals(
         list(getMessageSources(s)),
         [u"one", u"three", u"two"])