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
b4d24f36
Commit
b4d24f36
authored
Nov 30, 2014
by
Sarina Canelake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
s/pylint: disable=E1103/pylint: disable=maybe-no-member/
parent
b8c16d5e
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
14 additions
and
14 deletions
+14
-14
common/djangoapps/contentserver/tests/test.py
+5
-5
common/djangoapps/student/management/tests/test_transfer_students.py
+1
-1
common/djangoapps/student/tests/test_auto_auth.py
+2
-2
lms/djangoapps/dashboard/tests/test_support.py
+1
-1
lms/djangoapps/instructor/views/api.py
+1
-1
lms/djangoapps/mobile_api/course_info/tests.py
+2
-2
lms/djangoapps/mobile_api/video_outlines/tests.py
+1
-1
lms/djangoapps/shoppingcart/tests/test_models.py
+1
-1
No files found.
common/djangoapps/contentserver/tests/test.py
View file @
b4d24f36
...
...
@@ -69,7 +69,7 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
"""
self
.
client
.
logout
()
resp
=
self
.
client
.
get
(
self
.
url_unlocked
)
self
.
assertEqual
(
resp
.
status_code
,
200
)
# pylint: disable=E1103
self
.
assertEqual
(
resp
.
status_code
,
200
)
def
test_locked_asset_not_logged_in
(
self
):
"""
...
...
@@ -78,7 +78,7 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
"""
self
.
client
.
logout
()
resp
=
self
.
client
.
get
(
self
.
url_locked
)
self
.
assertEqual
(
resp
.
status_code
,
403
)
# pylint: disable=E1103
self
.
assertEqual
(
resp
.
status_code
,
403
)
def
test_locked_asset_not_registered
(
self
):
"""
...
...
@@ -87,7 +87,7 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
"""
self
.
client
.
login
(
username
=
self
.
non_staff_usr
,
password
=
self
.
non_staff_pwd
)
resp
=
self
.
client
.
get
(
self
.
url_locked
)
self
.
assertEqual
(
resp
.
status_code
,
403
)
# pylint: disable=E1103
self
.
assertEqual
(
resp
.
status_code
,
403
)
def
test_locked_asset_registered
(
self
):
"""
...
...
@@ -99,7 +99,7 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
self
.
client
.
login
(
username
=
self
.
non_staff_usr
,
password
=
self
.
non_staff_pwd
)
resp
=
self
.
client
.
get
(
self
.
url_locked
)
self
.
assertEqual
(
resp
.
status_code
,
200
)
# pylint: disable=E1103
self
.
assertEqual
(
resp
.
status_code
,
200
)
def
test_locked_asset_staff
(
self
):
"""
...
...
@@ -107,7 +107,7 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
"""
self
.
client
.
login
(
username
=
self
.
staff_usr
,
password
=
self
.
staff_pwd
)
resp
=
self
.
client
.
get
(
self
.
url_locked
)
self
.
assertEqual
(
resp
.
status_code
,
200
)
# pylint: disable=E1103
self
.
assertEqual
(
resp
.
status_code
,
200
)
def
test_range_request_full_file
(
self
):
"""
...
...
common/djangoapps/student/management/tests/test_transfer_students.py
View file @
b4d24f36
...
...
@@ -75,7 +75,7 @@ class TestTransferStudents(ModuleStoreTestCase):
self
.
assertTrue
(
self
.
signal_fired
)
# Confirm the analytics event was emitted.
self
.
mock_tracker
.
emit
.
assert_has_calls
(
# pylint: disable=
E1103
self
.
mock_tracker
.
emit
.
assert_has_calls
(
# pylint: disable=
maybe-no-member
[
call
(
EVENT_NAME_ENROLLMENT_ACTIVATED
,
...
...
common/djangoapps/student/tests/test_auto_auth.py
View file @
b4d24f36
...
...
@@ -163,8 +163,8 @@ class AutoAuthEnabledTestCase(UrlResetMixin, TestCase):
# Check that session and CSRF are set in the response
for
cookie
in
[
'csrftoken'
,
'sessionid'
]:
self
.
assertIn
(
cookie
,
response
.
cookies
)
# pylint: disable=
E1103
self
.
assertTrue
(
response
.
cookies
[
cookie
]
.
value
)
# pylint: disable=
E1103
self
.
assertIn
(
cookie
,
response
.
cookies
)
# pylint: disable=
maybe-no-member
self
.
assertTrue
(
response
.
cookies
[
cookie
]
.
value
)
# pylint: disable=
maybe-no-member
class
AutoAuthDisabledTestCase
(
UrlResetMixin
,
TestCase
):
...
...
lms/djangoapps/dashboard/tests/test_support.py
View file @
b4d24f36
...
...
@@ -106,7 +106,7 @@ class RefundTests(ModuleStoreTestCase):
pars
[
'confirmed'
]
=
'true'
response
=
self
.
client
.
post
(
'/support/refund/'
,
pars
)
self
.
assertTrue
(
response
.
status_code
,
302
)
response
=
self
.
client
.
get
(
response
.
get
(
'location'
))
# pylint: disable=
E1103
response
=
self
.
client
.
get
(
response
.
get
(
'location'
))
# pylint: disable=
maybe-no-member
self
.
assertContains
(
response
,
"Unenrolled
%
s from"
%
self
.
student
)
self
.
assertContains
(
response
,
"Refunded 1 for order id"
)
...
...
lms/djangoapps/instructor/views/api.py
View file @
b4d24f36
...
...
@@ -1229,7 +1229,7 @@ def spent_registration_codes(request, course_id): # pylint: disable=W0613
company_name
=
request
.
POST
[
'spent_company_name'
]
if
company_name
:
spent_codes_list
=
spent_codes_list
.
filter
(
invoice__company_name
=
company_name
)
# pylint:
disable=E1103
spent_codes_list
=
spent_codes_list
.
filter
(
invoice__company_name
=
company_name
)
# pylint:
disable=maybe-no-member
csv_type
=
'spent'
return
registration_codes_csv
(
"Spent_Registration_Codes.csv"
,
spent_codes_list
,
csv_type
)
...
...
lms/djangoapps/mobile_api/course_info/tests.py
View file @
b4d24f36
...
...
@@ -25,7 +25,7 @@ class TestVideoOutline(ModuleStoreTestCase, APITestCase):
url
=
reverse
(
'course-about-detail'
,
kwargs
=
{
'course_id'
:
unicode
(
self
.
course
.
id
)})
response
=
self
.
client
.
get
(
url
)
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertTrue
(
'overview'
in
response
.
data
)
# pylint: disable=
E1103
self
.
assertTrue
(
'overview'
in
response
.
data
)
# pylint: disable=
maybe-no-member
def
test_handouts
(
self
):
url
=
reverse
(
'course-handouts-list'
,
kwargs
=
{
'course_id'
:
unicode
(
self
.
course
.
id
)})
...
...
@@ -36,5 +36,5 @@ class TestVideoOutline(ModuleStoreTestCase, APITestCase):
url
=
reverse
(
'course-updates-list'
,
kwargs
=
{
'course_id'
:
unicode
(
self
.
course
.
id
)})
response
=
self
.
client
.
get
(
url
)
self
.
assertEqual
(
response
.
status_code
,
200
)
self
.
assertEqual
(
response
.
data
,
[])
# pylint: disable=
E1103
self
.
assertEqual
(
response
.
data
,
[])
# pylint: disable=
maybe-no-member
# TODO: add handouts and updates, somehow
lms/djangoapps/mobile_api/video_outlines/tests.py
View file @
b4d24f36
...
...
@@ -127,7 +127,7 @@ class TestVideoOutline(ModuleStoreTestCase, APITestCase):
url
=
reverse
(
'video-summary-list'
,
kwargs
=
{
'course_id'
:
unicode
(
self
.
course
.
id
)})
response
=
self
.
client
.
get
(
url
)
self
.
assertEqual
(
response
.
status_code
,
200
)
return
response
.
data
# pylint: disable=
E1103
return
response
.
data
# pylint: disable=
maybe-no-member
def
_create_video_with_subs
(
self
):
"""
...
...
lms/djangoapps/shoppingcart/tests/test_models.py
View file @
b4d24f36
...
...
@@ -180,7 +180,7 @@ class OrderTest(ModuleStoreTestCase):
self
.
assertIn
(
item
.
additional_instruction_text
,
mail
.
outbox
[
0
]
.
body
)
# Assert Google Analytics event fired for purchase.
self
.
mock_tracker
.
track
.
assert_called_once_with
(
# pylint: disable=
E1103
self
.
mock_tracker
.
track
.
assert_called_once_with
(
# pylint: disable=
maybe-no-member
1
,
'Completed Order'
,
{
...
...
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