Commit b7b1d43e by solashirai Committed by solashirai

Added basic docstrings

parent da6e3e23
......@@ -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):
"""
......
"""
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"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment