#NEWLINE# def setUp( self ) : #NEWLINE# #INDENT# user_agent = 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12' #NEWLINE# worker = Worker . objects . create ( ) #NEWLINE# worker . parse_user_agent ( user_agent ) #NEWLINE# worker . save ( ) #NEWLINE# ts = TestSuite ( name = 'Zamboni' , slug = 'zamboni' , default_url = 'http://server/qunit1.html' ) #NEWLINE# ts . save ( ) #NEWLINE# token = Token . create ( ts ) #NEWLINE# r = self . client . post ( reverse ( 'system.start_tests' ) , data = { #NEWLINE# #INDENT# 'browsers' : 'firefox' , #NEWLINE# 'token' : token , #NEWLINE# 'name' : ts . slug , #NEWLINE# #UNINDENT# } ) #NEWLINE# eq_ ( r . status_code , 200 ) #NEWLINE# r = self . client . post ( reverse ( 'work.query' ) , dict ( worker_id = worker . id , user_agent = user_agent ) ) #NEWLINE# eq_ ( r . status_code , 200 ) #NEWLINE# data = json . loads ( user_agent . content ) #NEWLINE# self . work_queue_id = data [ 'work_queue_id' ]