Skip to content

Instantly share code, notes, and snippets.

@jmaher
Created October 23, 2009 01:41
Show Gist options
  • Save jmaher/216530 to your computer and use it in GitHub Desktop.
Save jmaher/216530 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
c = TestAgent('http://localhost:8888', 'secretagent')
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