Skip to content

Instantly share code, notes, and snippets.

@mikeal
Forked from jmaher/gist:216530
Created October 23, 2009 01:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikeal/216535 to your computer and use it in GitHub Desktop.
Save mikeal/216535 to your computer and use it in GitHub Desktop.
from couchquery import Database
from testbot import create_job
from testbot.client import Client
class TestAgent(Client):
jobtypes = ['xpcshell']
def do_job(self, job):
print job
def setup_module(module):
module.c = TestAgent('http://localhost:8888', 'secretagent')
module.db = Database('http://localhost:5984/test_testbot')
def test_do_all_jobs():
for x in range(100):
create_job(db, {"jobtype":'xpcshell', "jobname":"test"+str(x)})
print 'doing test'
c.run()
def teardown_module(module):
module.db.delete(module.db.get(module.c.client_info['_id']))
test_do_all_jobs()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment