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
88060c05
Commit
88060c05
authored
Jun 21, 2013
by
mlsteele
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #144 from edx/fix/msteele/instructor_tests
fix gradebook tests
parents
ae960ccf
7fb9bfd6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
lms/djangoapps/instructor/tests/test_gradebook.py
+5
-5
No files found.
lms/djangoapps/instructor/tests/test_gradebook.py
View file @
88060c05
...
...
@@ -16,6 +16,7 @@ from xmodule.modulestore.django import modulestore
USER_COUNT
=
11
@override_settings
(
MODULESTORE
=
TEST_DATA_MONGO_MODULESTORE
)
class
TestGradebook
(
ModuleStoreTestCase
):
grading_policy
=
None
...
...
@@ -41,10 +42,7 @@ class TestGradebook(ModuleStoreTestCase):
metadata
=
{
'graded'
:
True
,
'format'
:
'Homework'
}
)
self
.
users
=
[
UserFactory
.
create
(
username
=
'robot
%
d'
%
i
,
email
=
'robot+test+
%
d@edx.org'
%
i
)
for
i
in
xrange
(
USER_COUNT
)
]
self
.
users
=
[
UserFactory
()
for
_
in
xrange
(
USER_COUNT
)]
for
user
in
self
.
users
:
CourseEnrollmentFactory
.
create
(
user
=
user
,
course_id
=
self
.
course
.
id
)
...
...
@@ -72,10 +70,11 @@ class TestGradebook(ModuleStoreTestCase):
def
test_response_code
(
self
):
self
.
assertEquals
(
self
.
response
.
status_code
,
200
)
class
TestDefaultGradingPolicy
(
TestGradebook
):
def
test_all_users_listed
(
self
):
for
user
in
self
.
users
:
self
.
assertIn
(
user
.
username
,
self
.
response
.
content
)
self
.
assertIn
(
user
.
username
,
unicode
(
self
.
response
.
content
,
'utf-8'
)
)
def
test_default_policy
(
self
):
# Default >= 50% passes, so Users 5-10 should be passing for Homework 1 [6]
...
...
@@ -92,6 +91,7 @@ class TestDefaultGradingPolicy(TestGradebook):
# One use at the top of the page [1]
self
.
assertEquals
(
293
,
self
.
response
.
content
.
count
(
'grade_None'
))
class
TestLetterCutoffPolicy
(
TestGradebook
):
grading_policy
=
{
"GRADER"
:
[
...
...
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