

def test_flush(self):
    self.store.get('three').AndReturn((self.env, 1))
    self.store.get('two').AndReturn((self.env, 2))
    self.store.get('one').AndReturn((self.env, 3))
    self.relay._attempt(queue.env, 1)
    self.store.remove('three')
    self.relay._attempt(self.env, 2)
    self.store.remove('two')
    self.relay._attempt(self.env, 3)
    self.store.remove('one')
    self.mox.ReplayAll()
    queue = Queue(self.store, self.relay, store_pool=5, relay_pool=5)
    queue._add_queued((float('inf'), 'one'))
    queue._add_queued((0, 'two'))
    queue._add_queued((float('-inf'), 'three'))
    queue.flush()
    queue.store_pool.join()
    queue.relay_pool.join()

dataset/ETHPy150Open slimta/python-slimta/test/test_slimta_queue.py TestQueue.test_flush/VarMisuse@76/88 `self`->`queue`