Commit 02de4609 by Alexander Kryklia

updates

parent 04294b04
......@@ -17,14 +17,13 @@ log = logging.getLogger(__name__)
class LTIFields(object):
"""provider_url and tool_id together is unique location of LTI in the web.
Scope settings should be scope content:
Cale: There is no difference in presentation to the user yet because
Scope settings should be scope content. Expanation by Cale:
"There is no difference in presentation to the user yet because
there is no sharing between courses. However, when we get to the point of being
able to have multiple courses using the same content,
then the distinction between Scope.settings (local to the current course),
and Scope.content (shared across all uses of this content in any course)
becomes much more clear/necessary.
becomes much more clear/necessary."
"""
client_key = String(help="Client key", default='', scope=Scope.settings)
client_secret = String(help="Client secret", default='', scope=Scope.settings)
......
......@@ -13,11 +13,15 @@ logger = getLogger(__name__)
@before.all
def setup_mock_lti_server():
server_host = '127.0.0.1'
# Add +1 to XQUEUE random port number
server_port = settings.XQUEUE_PORT + 1
address = (server_host, server_port)
# Create the mock server instance
server = MockLTIServer(server_port)
server = MockLTIServer(address)
logger.debug("LTI server started at {} port".format(str(server_port)))
# Start the server running in a separate daemon thread
# Because the thread is a daemon, it will terminate
......@@ -26,11 +30,17 @@ def setup_mock_lti_server():
server_thread.daemon = True
server_thread.start()
server.oauth_settings = {
'client_key': 'test_client_key',
'client_secret': 'test_client_secret',
'lti_base': 'http://{}:{}/'.format(server_host, server_port),
'lti_endpoint': 'correct_lti_endpoint'
}
# Store the server instance in lettuce's world
# so that other steps can access it
# (and we can shut it down later)
world.lti_server = server
world.lti_server_port = server_port
@after.all
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment