Better test naming.

main
Vincent Driessen 13 years ago
parent 196a9815d2
commit fc5097ce7a

@ -70,7 +70,8 @@ class TestQueue(RQTestCase):
conn.rpush('rq:my-queue', 'some val') conn.rpush('rq:my-queue', 'some val')
self.assertEquals(q.empty, False) self.assertEquals(q.empty, False)
def test_put_work_on_queue(self):
def test_enqueue(self):
"""Putting work on queues using delay.""" """Putting work on queues using delay."""
q = Queue('my-queue') q = Queue('my-queue')
self.assertEquals(q.empty, True) self.assertEquals(q.empty, True)
@ -80,7 +81,7 @@ class TestQueue(RQTestCase):
self.assertEquals(q.empty, False) self.assertEquals(q.empty, False)
self.assertQueueContains(q, testjob) self.assertQueueContains(q, testjob)
def test_put_work_on_different_queue(self): def test_enqueue_to_different_queue(self):
"""Putting work on alternative queues using enqueue.""" """Putting work on alternative queues using enqueue."""
# Override testjob spec holds which queue # Override testjob spec holds which queue
@ -90,7 +91,7 @@ class TestQueue(RQTestCase):
self.assertEquals(q.empty, False) self.assertEquals(q.empty, False)
self.assertQueueContains(q, testjob) self.assertQueueContains(q, testjob)
def test_put_work_on_different_queue_reverse(self): def test_enqueue_to_different_queue_reverse(self):
"""Putting work on specific queues using the Queue object.""" """Putting work on specific queues using the Queue object."""
q = Queue('alt-queue') q = Queue('alt-queue')
@ -99,6 +100,7 @@ class TestQueue(RQTestCase):
self.assertEquals(q.empty, False) self.assertEquals(q.empty, False)
self.assertQueueContains(q, testjob) self.assertQueueContains(q, testjob)
def test_dequeue(self): def test_dequeue(self):
"""Fetching work from specific queue.""" """Fetching work from specific queue."""
q = Queue('foo') q = Queue('foo')
@ -109,6 +111,7 @@ class TestQueue(RQTestCase):
self.assertEquals(f, testjob) self.assertEquals(f, testjob)
self.assertEquals(args[0], 'Rick') self.assertEquals(args[0], 'Rick')
class TestJob(RQTestCase): class TestJob(RQTestCase):
def test_job_methods(self): def test_job_methods(self):
"""Jobs have methods to enqueue them.""" """Jobs have methods to enqueue them."""

Loading…
Cancel
Save