Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
b7b1d43e
Commit
b7b1d43e
authored
Nov 19, 2015
by
solashirai
Committed by
solashirai
Mar 26, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added basic docstrings
parent
da6e3e23
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
openedx/tests/xblock_integration/test_crowdsource_hinter.py
+8
-4
openedx/tests/xblock_integration/test_crowdsourcehinter_problem.py
+2
-2
No files found.
openedx/tests/xblock_integration/test_crowdsource_hinter.py
View file @
b7b1d43e
...
...
@@ -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
):
"""
...
...
openedx/tests/xblock_integration/test_crowdsourcehinter_problem.py
View file @
b7b1d43e
"""
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"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment