コード例 #1
0
 def test_can_personalize_separator(self):
     sep = '+'
     q = SendQueue(separator=sep)
     value = '1+2+3'
     for i in value.split('+'):
         q.push(i)
     self.assertEquals(q.get(), value)
コード例 #2
0
    def test_two_values_use_separator(self):
        q = SendQueue()
        one = 'one'
        two = 'two'
        q.push(one)
        q.push(two)

        self.assertEquals(q.get(), '%s%s%s' % (one, q.SEPARATOR, two))
コード例 #3
0
 def test_single_value_doesnt_use_separator(self):
     q = SendQueue()
     q.push('xxx')
     self.assertFalse(q.SEPARATOR in q.get())