def test_insecure_config_request(self): self.request.is_secure = MagicMock(return_value=False) self.request.META['SERVER_PORT'] = 80 response = views.tool_config(self.request) self.verify_response_value( response, 'lti:launch_url', 'http://{}{}'.format(self.server_name, self.deployment_path))
def test_insecure_config_request(self): self.request.is_secure = MagicMock(return_value=False) self.request.META['SERVER_PORT'] = 80 response = views.tool_config(self.request) self.verify_response_value( response, 'lti:launch_url', 'http://{}{}'.format( self.server_name, self.deployment_path ))
def test_xpaths(self, xpath, expected): response = views.tool_config(self.request) self.verify_response_value(response, xpath, expected)
def test_secure_config_request(self): response = views.tool_config(self.request) self.verify_response_value( response, 'lti:launch_url', 'https://{}{}'.format(self.server_name, self.deployment_path))
def test_response_status_code(self): response = views.tool_config(self.request) self.assertEqual(response.status_code, 200, 'Expected OK status code for tool config')
def test_response_content_type(self): response = views.tool_config(self.request) self.assertEqual( response['Content-Type'], 'text/xml', 'Expected tool config Content-Type header to be "text/xml"')
def test_secure_config_request(self): response = views.tool_config(self.request) self.verify_response_value( response, 'lti:launch_url', 'https://{}{}'.format( self.server_name, self.deployment_path ))
def test_response_status_code(self): response = views.tool_config(self.request) self.assertEqual( response.status_code, 200, 'Expected OK status code for tool config' )
def test_response_content_type(self): response = views.tool_config(self.request) self.assertEqual( response['Content-Type'], 'text/xml', 'Expected tool config Content-Type header to be "text/xml"' )