-
-
Save mikeal/216535 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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