diff --git a/openedx/tests/xblock_integration/test_crowdsource_hinter.py b/openedx/tests/xblock_integration/test_crowdsource_hinter.py index c9d8373f9a..efe0a9659b 100644 --- a/openedx/tests/xblock_integration/test_crowdsource_hinter.py +++ b/openedx/tests/xblock_integration/test_crowdsource_hinter.py @@ -17,7 +17,7 @@ from lms.djangoapps.lms_xblock.runtime import quote_slashes class TestCrowdsourceHinter(SharedModuleStoreTestCase, LoginEnrollmentTestCase): """ - SOLA: Please write a docstring here + Create the test environment with the crowdsourcehinter xblock. """ STUDENTS = [ {'email': 'view@test.com', 'password': 'foo'}, @@ -115,7 +115,9 @@ class TestCrowdsourceHinter(SharedModuleStoreTestCase, LoginEnrollmentTestCase): class TestHinterFunctions(TestCrowdsourceHinter): """ - Sola: Please write a docstring for this + Check that the essential functions of the hinter work as expected. + Tests cover the basic process of receiving a hint, adding a new hint, + and rating/reporting hints. """ def test_get_hint_with_no_hints(self): """ @@ -133,8 +135,10 @@ class TestHinterFunctions(TestCrowdsourceHinter): self.enroll_student(self.STUDENTS[0]['email'], self.STUDENTS[0]['password']) data = {'new_hint_submission': 'new hint for answer 1', 'answer': 'incorrect answer 1'} self.call_event('get_hint', {'submittedanswer': 'ans=incorrect+answer+1'}) - #result = self.call_event('add_new_hint', data) - # SOLA: We need something here to check if the result is correct. + result = self.call_event('add_new_hint', data) + expected = {'success':True, + 'result': 'Hint added'} + self.assertEqual(result, expected) def test_get_hint(self): """ diff --git a/openedx/tests/xblock_integration/test_crowdsourcehinter_problem.py b/openedx/tests/xblock_integration/test_crowdsourcehinter_problem.py index 9ec4efba3f..981837b3b5 100644 --- a/openedx/tests/xblock_integration/test_crowdsourcehinter_problem.py +++ b/openedx/tests/xblock_integration/test_crowdsourcehinter_problem.py @@ -1,5 +1,5 @@ """ -SOLA: Would you mind writing a docstring for this file? +Javascript tests for the crowdsourcehinter xblock """ from textwrap import dedent from common.test.acceptance.fixtures.course import CourseFixture, XBlockFixtureDesc @@ -11,7 +11,7 @@ from common.test.acceptance.tests.helpers import UniqueCourseTest class CrowdsourcehinterProblemTest(UniqueCourseTest): """ - SOLA: Would you mind writing a docstring for this class? + Test scenario for the hinter. """ USERNAME = "STAFF_TESTER" EMAIL = "johndoe@example.com"