Skip to content

Commit

Permalink
Disable invalid LTI test
Browse files Browse the repository at this point in the history
  • Loading branch information
troeger committed Nov 15, 2018
1 parent ee4d0d9 commit 3f0d869
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions web/opensubmit/tests/test_student_display.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,21 +233,22 @@ def test_lti_config_info(self):
response = self.c.get('/assignments/%s/lti/' % self.open_assignment.pk)
self.assertEqual(response.status_code, 200)

def test_working_lti_credentials(self):
url = "http://testserver/assignments/%s/lti/" % self.open_assignment.pk

consumer = ToolConsumer(
consumer_key=self.course.lti_key,
consumer_secret=self.course.lti_secret,
launch_url=url,
params={
'lti_message_type': 'basic-lti-launch-request',
'resource_link_id': 1
}
)

response = self.c.post(url, consumer.generate_launch_data())
self.assertEqual(302, response.status_code)
# Only works overy HTTPS, which is not given by the test server
# def test_working_lti_credentials(self):
# url = "http://testserver/assignments/%s/lti/" % self.open_assignment.pk

# consumer = ToolConsumer(
# consumer_key=self.course.lti_key,
# consumer_secret=self.course.lti_secret,
# launch_url=url,
# params={
# 'lti_message_type': 'basic-lti-launch-request',
# 'resource_link_id': 1
# }
# )

# response = self.c.post(url, consumer.generate_launch_data())
# self.assertEqual(302, response.status_code)

def test_wrong_lti_credentials(self):
url = "http://testserver/assignments/%s/lti/" % self.open_assignment.pk
Expand Down

0 comments on commit 3f0d869

Please sign in to comment.