Added basic docstrings
This commit is contained in:
@@ -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):
|
||||
"""
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user