Ejemplo n.º 1
0
 def test_next_limit(self):
     q = Queue()
     upload_size = 50
     consumer = Consumer(q, '', upload_size)
     for i in range(10000):
         q.put(i)
     next = consumer.next()
     self.assertEqual(next, list(range(upload_size)))
Ejemplo n.º 2
0
 def test_next(self):
     q = Queue()
     consumer = Consumer(q, '')
     q.put(1)
     next = consumer.next()
     self.assertEqual(next, [1])