Skip to content
Snippets Groups Projects
Unverified Commit 72bdb24c authored by Cali's avatar Cali Committed by GitHub
Browse files

Merge pull request #19247 from edx/cstenson/lti_problem_content_gating_tests

Add LTI problem type tests on content gating.
parents efa58328 1ec08701
No related merge requests found
......@@ -70,6 +70,19 @@ class TestProblemTypeAccess(SharedModuleStoreTestCase):
category='vertical',
display_name='Lesson 1 Vertical - Unit 1'
)
self.lti_block = ItemFactory.create(
parent=self.vertical,
category='lti_consumer',
display_name='lti_consumer',
has_score=True,
graded=True,
)
self.lti_block_not_scored = ItemFactory.create(
parent=self.vertical,
category='lti_consumer',
display_name='lti_consumer_2',
has_score=False,
)
self.problem_dict = {}
for prob_type in self.PROBLEM_TYPES:
block = ItemFactory.create(
......@@ -131,6 +144,15 @@ class TestProblemTypeAccess(SharedModuleStoreTestCase):
# check that has_access did not raise the IncorrectPartitionGroupError thereby not gating the block
self.assertFalse(mock_access_error.called)
def test_lti_audit_access(self):
"""
LTI stands for learning tools interoperability and is a 3rd party iframe that pulls in learning content from
outside sources. This tests that audit users cannot see LTI components with graded content but can see the LTI
components which do not have graded content.
"""
self.assert_block_is_gated(self.lti_block, True)
self.assert_block_is_gated(self.lti_block_not_scored, False)
@ddt.data(
*PROBLEM_TYPES
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment