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
82a41b38
Commit
82a41b38
authored
Oct 19, 2015
by
Giovanni Di Milia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed new pylint violations in lms/djangoapps/ccx
parent
7b71f95f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
lms/djangoapps/ccx/tests/test_models.py
+2
-2
lms/djangoapps/ccx/tests/test_views.py
+10
-10
No files found.
lms/djangoapps/ccx/tests/test_models.py
View file @
82a41b38
...
...
@@ -68,7 +68,7 @@ class TestCCX(ModuleStoreTestCase):
self
.
set_ccx_override
(
'start'
,
expected
)
actual
=
self
.
ccx
.
start
# pylint: disable=no-member
diff
=
expected
-
actual
self
.
assert
True
(
abs
(
diff
.
total_seconds
())
<
1
)
self
.
assert
Less
(
abs
(
diff
.
total_seconds
()),
1
)
def
test_ccx_start_caching
(
self
):
"""verify that caching the start property works to limit queries"""
...
...
@@ -93,7 +93,7 @@ class TestCCX(ModuleStoreTestCase):
self
.
set_ccx_override
(
'due'
,
expected
)
actual
=
self
.
ccx
.
due
# pylint: disable=no-member
diff
=
expected
-
actual
self
.
assert
True
(
abs
(
diff
.
total_seconds
())
<
1
)
self
.
assert
Less
(
abs
(
diff
.
total_seconds
()),
1
)
def
test_ccx_due_caching
(
self
):
"""verify that caching the due property works to limit queries"""
...
...
lms/djangoapps/ccx/tests/test_views.py
View file @
82a41b38
...
...
@@ -406,9 +406,9 @@ class TestCoachDashboard(SharedModuleStoreTestCase, LoginEnrollmentTestCase):
self
.
assertEqual
(
response
.
status_code
,
200
)
# we were redirected to our current location
self
.
assertEqual
(
len
(
response
.
redirect_chain
),
1
)
self
.
assert
True
(
302
in
response
.
redirect_chain
[
0
])
self
.
assert
In
(
302
,
response
.
redirect_chain
[
0
])
self
.
assertEqual
(
len
(
outbox
),
1
)
self
.
assert
True
(
student
.
email
in
outbox
[
0
]
.
recipients
())
# pylint: disable=no-member
self
.
assert
In
(
student
.
email
,
outbox
[
0
]
.
recipients
())
# pylint: disable=no-member
# a CcxMembership exists for this student
self
.
assertTrue
(
CourseEnrollment
.
objects
.
filter
(
course_id
=
self
.
course
.
id
,
user
=
student
)
.
exists
()
...
...
@@ -438,9 +438,9 @@ class TestCoachDashboard(SharedModuleStoreTestCase, LoginEnrollmentTestCase):
self
.
assertEqual
(
response
.
status_code
,
200
)
# we were redirected to our current location
self
.
assertEqual
(
len
(
response
.
redirect_chain
),
1
)
self
.
assert
True
(
302
in
response
.
redirect_chain
[
0
])
self
.
assert
In
(
302
,
response
.
redirect_chain
[
0
])
self
.
assertEqual
(
len
(
outbox
),
1
)
self
.
assert
True
(
student
.
email
in
outbox
[
0
]
.
recipients
())
# pylint: disable=no-member
self
.
assert
In
(
student
.
email
,
outbox
[
0
]
.
recipients
())
# pylint: disable=no-member
def
test_enroll_non_user_student
(
self
):
"""enroll a list of students who are not users yet
...
...
@@ -465,9 +465,9 @@ class TestCoachDashboard(SharedModuleStoreTestCase, LoginEnrollmentTestCase):
self
.
assertEqual
(
response
.
status_code
,
200
)
# we were redirected to our current location
self
.
assertEqual
(
len
(
response
.
redirect_chain
),
1
)
self
.
assert
True
(
302
in
response
.
redirect_chain
[
0
])
self
.
assert
In
(
302
,
response
.
redirect_chain
[
0
])
self
.
assertEqual
(
len
(
outbox
),
1
)
self
.
assert
True
(
test_email
in
outbox
[
0
]
.
recipients
())
self
.
assert
In
(
test_email
,
outbox
[
0
]
.
recipients
())
self
.
assertTrue
(
CourseEnrollmentAllowed
.
objects
.
filter
(
course_id
=
course_key
,
email
=
test_email
...
...
@@ -499,7 +499,7 @@ class TestCoachDashboard(SharedModuleStoreTestCase, LoginEnrollmentTestCase):
self
.
assertEqual
(
response
.
status_code
,
200
)
# we were redirected to our current location
self
.
assertEqual
(
len
(
response
.
redirect_chain
),
1
)
self
.
assert
True
(
302
in
response
.
redirect_chain
[
0
])
self
.
assert
In
(
302
,
response
.
redirect_chain
[
0
])
self
.
assertFalse
(
CourseEnrollmentAllowed
.
objects
.
filter
(
course_id
=
course_key
,
email
=
test_email
...
...
@@ -559,7 +559,7 @@ class TestCoachDashboard(SharedModuleStoreTestCase, LoginEnrollmentTestCase):
self
.
assertEqual
(
response
.
status_code
,
200
)
# we were redirected to our current location
self
.
assertEqual
(
len
(
response
.
redirect_chain
),
1
)
self
.
assert
True
(
302
in
response
.
redirect_chain
[
0
])
self
.
assert
In
(
302
,
response
.
redirect_chain
[
0
])
self
.
assertEqual
(
outbox
,
[])
# a CcxMembership exists for this student
self
.
assertTrue
(
...
...
@@ -590,7 +590,7 @@ class TestCoachDashboard(SharedModuleStoreTestCase, LoginEnrollmentTestCase):
self
.
assertEqual
(
response
.
status_code
,
200
)
# we were redirected to our current location
self
.
assertEqual
(
len
(
response
.
redirect_chain
),
1
)
self
.
assert
True
(
302
in
response
.
redirect_chain
[
0
])
self
.
assert
In
(
302
,
response
.
redirect_chain
[
0
])
self
.
assertEqual
(
outbox
,
[])
...
...
@@ -738,7 +738,7 @@ class TestCCXGrades(SharedModuleStoreTestCase, LoginEnrollmentTestCase):
response
.
content
.
strip
()
.
split
(
'
\n
'
)
)
data
=
dict
(
zip
(
headers
,
row
))
self
.
assert
True
(
'HW 04'
not
in
data
)
self
.
assert
NotIn
(
'HW 04'
,
data
)
self
.
assertEqual
(
data
[
'HW 01'
],
'0.75'
)
self
.
assertEqual
(
data
[
'HW 02'
],
'0.5'
)
self
.
assertEqual
(
data
[
'HW 03'
],
'0.25'
)
...
...
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