""" Test capa problem. """ import textwrap import unittest from unittest.mock import patch, MagicMock from django.conf import settings from django.test import override_settings import pytest import ddt from lxml import etree from markupsafe import Markup from xmodule.capa.correctmap import CorrectMap from xmodule.capa.responsetypes import LoncapaProblemError from xmodule.capa.tests.helpers import new_loncapa_problem from openedx.core.djangolib.markup import HTML FEATURES_WITH_GRADING_METHOD_IN_PROBLEMS = settings.FEATURES.copy() FEATURES_WITH_GRADING_METHOD_IN_PROBLEMS['ENABLE_GRADING_METHOD_IN_PROBLEMS'] = True @ddt.ddt class CAPAProblemTest(unittest.TestCase): """ CAPA problem related tests""" @ddt.unpack @ddt.data( {'question': 'Select the correct synonym of paranoid?'}, {'question': 'Select the correct synonym of paranoid?'}, ) def test_label_and_description_inside_responsetype(self, question): """ Verify that * label is extracted *