Example #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)))
Example #2
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)))
Example #3
0
 def test_next(self):
     q = Queue()
     consumer = Consumer(q, '')
     q.put(1)
     next = consumer.next()
     self.assertEqual(next, [1])
Example #4
0
 def test_next(self):
     q = Queue()
     consumer = Consumer(q, '')
     q.put(1)
     next = consumer.next()
     self.assertEqual(next, [1])