def test_ttl(self):
        queue = self.queues_manager.get_queue("testqueue")
        with mock.patch("time.time") as time_mock:
            time_results = iter([0, 3])
            time_mock.side_effect = lambda: next(time_results)
            queue.disconnect()
            queue.push(Message(b"data a", uuid=b"a", ttl=1))
            queue.push(Message(b"data b", uuid=b"b", ttl=5))
            queue.connect()
            self.assertEqual(len(queue), 1)
            msg = queue.get()
            self.assertEqual(msg.uuid, b"b")
            self.assertEqual(msg.ttl, 2)  # 5 - 3

    ##################################################################
Returns the name of the last step.
dataset/ETHPy150Open dsiroky/snakemq/tests/unittests/tests_queues.py/TestQueue.test_ttl--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/contrib/formtools/wizard/views.py/StepsHelper.last