def setUp(self): """Set up the client and stubs to be used across tests.""" # Attempt to load settings for the Mathworks servers self.api_key = settings.MATHWORKS_API_KEY self.grader_url = settings.XQUEUES.get('matlab', None) # Skip if the settings are missing if self.api_key is None or self.grader_url is None: raise SkipTest('You must specify an API key and URL for Mathworks in test_env.json') # Create the response listener # which listens for responses on an open port self.response_listener = GradeResponseListener() # Create the client (input submissions) # and configure it to send messages # that xqueue will send to our response listener self.client = XQueueTestClient(self.response_listener.port_num()) # Create the user and make sure we are logged in XQueueTestClient.create_user('test', '*****@*****.**', 'password') self.client.login(username='******', password='******') # Start up workers to pull messages from the queue # and forward them to our grader PassiveGraderStub.start_workers_for_grader_url(MatlabGraderTest.QUEUE_NAME, self.grader_url)
def setUp(self): """Set up the client and stubs to be used across tests.""" # Attempt to load settings for the Mathworks servers self.api_key = settings.MATHWORKS_API_KEY self.grader_url = settings.XQUEUES.get('matlab', None) # Skip if the settings are missing if self.api_key is None or self.grader_url is None: raise SkipTest( 'You must specify an API key and URL for Mathworks in test_env.json' ) # Create the response listener # which listens for responses on an open port self.response_listener = GradeResponseListener() # Create the client (input submissions) # and configure it to send messages # that xqueue will send to our response listener self.client = XQueueTestClient(self.response_listener.port_num()) # Create the user and make sure we are logged in XQueueTestClient.create_user('test', '*****@*****.**', 'password') self.client.login(username='******', password='******') # Start up workers to pull messages from the queue # and forward them to our grader PassiveGraderStub.start_workers_for_grader_url( MatlabGraderTest.QUEUE_NAME, self.grader_url)
def setUp(self): """Set up the client and stubs to be used across tests.""" # Create the grader self.grader = SimpleActiveGrader(ActiveGraderTest.QUEUE_NAME, ActiveGraderTest.GRADER_RESPONSE) # Create the response listener # and configure it to receive messages on a local port self.response_listener = GradeResponseListener() # Create the client (input submissions) # and configure it to send messages # that will be sent back to our response listener self.client = XQueueTestClient(self.response_listener.port_num()) # Create the user and make sure we are logged in XQueueTestClient.create_user('test', '*****@*****.**', 'password') self.client.login(username='******', password='******')
def setUp(self): """Set up the client and stubs to be used across tests.""" # Create the grader self.grader = SimpleActiveGrader(ActiveGraderTest.QUEUE_NAME, ActiveGraderTest.GRADER_RESPONSE) # Create the response listener # and configure it to receive messages on a local port self.response_listener = GradeResponseListener() # Create the client (input submissions) # and configure it to send messages # that will be sent back to our response listener self.client = XQueueTestClient(self.response_listener.port_num()) # Create the user and make sure we are logged in XQueueTestClient.create_user('test', '*****@*****.**', 'password') self.client.login(username='******', password='******')