From a51f87be43832d772756c7c21d1e7f77c526f81b Mon Sep 17 00:00:00 2001 From: Daniel Wong Date: Tue, 13 May 2025 15:35:28 -0600 Subject: [PATCH] test: removing unused tests related to masking --- xmodule/tests/test_capa_block.py | 42 -------------------------------- 1 file changed, 42 deletions(-) diff --git a/xmodule/tests/test_capa_block.py b/xmodule/tests/test_capa_block.py index 2801430320..b48aa10ef8 100644 --- a/xmodule/tests/test_capa_block.py +++ b/xmodule/tests/test_capa_block.py @@ -2798,48 +2798,6 @@ class ProblemBlockTest(unittest.TestCase): # lint-amnesty, pylint: disable=miss ('shuffle', ['choice_3', 'choice_1', 'choice_2', 'choice_0']) assert event_info['success'] == 'correct' - @unittest.skip("masking temporarily disabled") - def test_save_unmask(self): - """On problem save, unmasked data should appear on publish.""" - block = CapaFactory.create(xml=self.common_shuffle_xml) - with patch.object(block.runtime, 'publish') as mock_publish: - get_request_dict = {CapaFactory.input_key(): 'mask_0'} - block.save_problem(get_request_dict) - mock_call = mock_publish.mock_calls[0] - event_info = mock_call[1][1] - assert event_info['answers'][CapaFactory.answer_key()] == 'choice_2' - assert event_info['permutation'][CapaFactory.answer_key()] is not None - - @unittest.skip("masking temporarily disabled") - def test_reset_unmask(self): - """On problem reset, unmask names should appear publish.""" - block = CapaFactory.create(xml=self.common_shuffle_xml) - get_request_dict = {CapaFactory.input_key(): 'mask_0'} - block.submit_problem(get_request_dict) - # On reset, 'old_state' should use unmasked names - with patch.object(block.runtime, 'publish') as mock_publish: - block.reset_problem(None) - mock_call = mock_publish.mock_calls[0] - event_info = mock_call[1][1] - assert mock_call[1][0] == 'reset_problem' - assert event_info['old_state']['student_answers'][CapaFactory.answer_key()] == 'choice_2' - assert event_info['permutation'][CapaFactory.answer_key()] is not None - - @unittest.skip("masking temporarily disabled") - def test_rescore_unmask(self): - """On problem rescore, unmasked names should appear on publish.""" - block = CapaFactory.create(xml=self.common_shuffle_xml) - get_request_dict = {CapaFactory.input_key(): 'mask_0'} - block.submit_problem(get_request_dict) - # On rescore, state/student_answers should use unmasked names - with patch.object(block.runtime, 'publish') as mock_publish: - block.rescore_problem(only_if_higher=False) # lint-amnesty, pylint: disable=no-member - mock_call = mock_publish.mock_calls[0] - event_info = mock_call[1][1] - assert mock_call[1][0] == 'problem_rescore' - assert event_info['state']['student_answers'][CapaFactory.answer_key()] == 'choice_2' - assert event_info['permutation'][CapaFactory.answer_key()] is not None - def test_check_unmask_answerpool(self): """Check answer-pool question publish uses unmasked names""" xml = textwrap.dedent("""