Exemple #1
0
 def test_success(self):
     queue = get_queue()
     queue.empty()
     thread_queue.clear()
     self.assertEqual(queue.count, 0)
     self.client.get(reverse('success'))
     self.assertEqual(queue.count, 1)
Exemple #2
0
 def test_success(self):
     queue = get_queue()
     queue.empty()
     thread_queue.clear()
     self.assertEqual(queue.count, 0)
     self.client.get(reverse('success'))
     self.assertEqual(queue.count, 1)
Exemple #3
0
 def test_clear(self):
     queue = get_queue()
     delayed_queue = thread_queue.get_queue()
     delayed_queue.append((queue, divide, (1,), {'b': 1}))
     thread_queue.clear()
     delayed_queue = thread_queue.get_queue()
     self.assertEqual(delayed_queue, [])
Exemple #4
0
 def test_clear(self):
     queue = get_queue()
     delayed_queue = thread_queue.get_queue()
     delayed_queue.append((queue, divide, (1,), {'b': 1}))
     thread_queue.clear()
     delayed_queue = thread_queue.get_queue()
     self.assertEqual(delayed_queue, [])