Skip to content

Instantly share code, notes, and snippets.

@jgeewax
Created August 20, 2010 23:12
Show Gist options
  • Save jgeewax/541388 to your computer and use it in GitHub Desktop.
Save jgeewax/541388 to your computer and use it in GitHub Desktop.
import unittest
from gaetestbed import TaskQueueTestCase
class MyTestCase(unittest.TestCase, TaskQueueTestCase):
def test_taskqueue(self):
# Check that nothing is in the queue
self.assertTasksInQueue(0)
# Add something to a Queue
add_to_taskqueue(url='/worker/dummy/')
# Checks that there are things in the queue
self.assertTasksInQueue()
# Checks exactly one item in the queue
self.assertTasksInQueue(1)
# Checks that 1 item with the specified URL is in the queue
self.assertTasksInQueue(1, url='/worker/dummy/')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment