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
7229ef92
Commit
7229ef92
authored
Nov 30, 2014
by
Sarina Canelake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
s/pylint: disable=W0212/pylint: disable=protected-access/
parent
ff18b7d0
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
43 additions
and
44 deletions
+43
-44
cms/djangoapps/contentstore/tests/test_contentstore.py
+0
-1
common/lib/capa/capa/tests/test_inputtypes.py
+23
-23
common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py
+1
-1
common/lib/xmodule/xmodule/modulestore/tests/test_split_modulestore.py
+2
-2
common/lib/xmodule/xmodule/tests/test_capa_module.py
+2
-2
common/lib/xmodule/xmodule/tests/test_import.py
+2
-2
common/lib/xmodule/xmodule/tests/test_textannotation.py
+2
-2
common/lib/xmodule/xmodule/tests/test_video.py
+1
-1
common/lib/xmodule/xmodule/tests/test_videoannotation.py
+4
-4
docs/en_us/developers/source/conf.py
+1
-1
docs/en_us/platform_api/source/conf.py
+1
-1
lms/djangoapps/course_wiki/middleware.py
+1
-1
lms/djangoapps/courseware/tests/test_access.py
+1
-1
lms/djangoapps/courseware/tests/test_video_xml.py
+1
-1
lms/djangoapps/shoppingcart/admin.py
+1
-1
No files found.
cms/djangoapps/contentstore/tests/test_contentstore.py
View file @
7229ef92
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
# pylint: disable=W0212
import
copy
import
copy
import
mock
import
mock
...
...
common/lib/capa/capa/tests/test_inputtypes.py
View file @
7229ef92
This diff is collapsed.
Click to expand it.
common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py
View file @
7229ef92
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
Unit tests for the Mongo modulestore
Unit tests for the Mongo modulestore
"""
"""
# pylint: disable=no-member
# pylint: disable=no-member
# pylint: disable=
W0212
# pylint: disable=
protected-access
# pylint: disable=no-name-in-module
# pylint: disable=no-name-in-module
from
nose.tools
import
assert_equals
,
assert_raises
,
\
from
nose.tools
import
assert_equals
,
assert_raises
,
\
assert_not_equals
,
assert_false
,
assert_true
,
assert_greater
,
assert_is_instance
,
assert_is_none
assert_not_equals
,
assert_false
,
assert_true
,
assert_greater
,
assert_is_instance
,
assert_is_none
...
...
common/lib/xmodule/xmodule/modulestore/tests/test_split_modulestore.py
View file @
7229ef92
...
@@ -865,7 +865,7 @@ class SplitModuleItemTests(SplitModuleTest):
...
@@ -865,7 +865,7 @@ class SplitModuleItemTests(SplitModuleTest):
with
self
.
assertRaises
(
ItemNotFoundError
):
with
self
.
assertRaises
(
ItemNotFoundError
):
modulestore
()
.
get_item
(
locator
)
modulestore
()
.
get_item
(
locator
)
# pylint: disable=
W0212
# pylint: disable=
protected-access
def
test_matching
(
self
):
def
test_matching
(
self
):
'''
'''
test the block and value matches help functions
test the block and value matches help functions
...
@@ -1304,7 +1304,7 @@ class TestItemCrud(SplitModuleTest):
...
@@ -1304,7 +1304,7 @@ class TestItemCrud(SplitModuleTest):
fields
=
{
'display_name'
:
'problem 2'
,
'data'
:
another_payload
},
fields
=
{
'display_name'
:
'problem 2'
,
'data'
:
another_payload
},
definition_locator
=
original
.
definition_locator
,
definition_locator
=
original
.
definition_locator
,
)
)
# pylint: disable=
W0212
# pylint: disable=
protected-access
modulestore
()
.
_clear_cache
()
modulestore
()
.
_clear_cache
()
# now begin the test
# now begin the test
...
...
common/lib/xmodule/xmodule/tests/test_capa_module.py
View file @
7229ef92
...
@@ -601,7 +601,7 @@ class CapaModuleTest(unittest.TestCase):
...
@@ -601,7 +601,7 @@ class CapaModuleTest(unittest.TestCase):
def
test_check_problem_with_files
(
self
):
def
test_check_problem_with_files
(
self
):
# Check a problem with uploaded files, using the check_problem API.
# Check a problem with uploaded files, using the check_problem API.
# pylint: disable=
W0212
# pylint: disable=
protected-access
# The files we'll be uploading.
# The files we'll be uploading.
fnames
=
[
"prog1.py"
,
"prog2.py"
,
"prog3.py"
]
fnames
=
[
"prog1.py"
,
"prog2.py"
,
"prog3.py"
]
...
@@ -650,7 +650,7 @@ class CapaModuleTest(unittest.TestCase):
...
@@ -650,7 +650,7 @@ class CapaModuleTest(unittest.TestCase):
def
test_check_problem_with_files_as_xblock
(
self
):
def
test_check_problem_with_files_as_xblock
(
self
):
# Check a problem with uploaded files, using the XBlock API.
# Check a problem with uploaded files, using the XBlock API.
# pylint: disable=
W0212
# pylint: disable=
protected-access
# The files we'll be uploading.
# The files we'll be uploading.
fnames
=
[
"prog1.py"
,
"prog2.py"
,
"prog3.py"
]
fnames
=
[
"prog1.py"
,
"prog2.py"
,
"prog3.py"
]
...
...
common/lib/xmodule/xmodule/tests/test_import.py
View file @
7229ef92
...
@@ -206,7 +206,7 @@ class ImportTestCase(BaseCourseTestCase):
...
@@ -206,7 +206,7 @@ class ImportTestCase(BaseCourseTestCase):
descriptor
=
system
.
process_xml
(
start_xml
)
descriptor
=
system
.
process_xml
(
start_xml
)
compute_inherited_metadata
(
descriptor
)
compute_inherited_metadata
(
descriptor
)
# pylint: disable=
W0212
# pylint: disable=
protected-access
print
(
descriptor
,
descriptor
.
_field_data
)
print
(
descriptor
,
descriptor
.
_field_data
)
self
.
assertEqual
(
descriptor
.
due
,
ImportTestCase
.
date
.
from_json
(
v
))
self
.
assertEqual
(
descriptor
.
due
,
ImportTestCase
.
date
.
from_json
(
v
))
...
@@ -296,7 +296,7 @@ class ImportTestCase(BaseCourseTestCase):
...
@@ -296,7 +296,7 @@ class ImportTestCase(BaseCourseTestCase):
</course>'''
.
format
(
due
=
course_due
,
org
=
ORG
,
course
=
COURSE
,
url_name
=
url_name
)
</course>'''
.
format
(
due
=
course_due
,
org
=
ORG
,
course
=
COURSE
,
url_name
=
url_name
)
descriptor
=
system
.
process_xml
(
start_xml
)
descriptor
=
system
.
process_xml
(
start_xml
)
child
=
descriptor
.
get_children
()[
0
]
child
=
descriptor
.
get_children
()[
0
]
# pylint: disable=
W0212
# pylint: disable=
protected-access
child
.
_field_data
.
set
(
child
,
'due'
,
child_due
)
child
.
_field_data
.
set
(
child
,
'due'
,
child_due
)
compute_inherited_metadata
(
descriptor
)
compute_inherited_metadata
(
descriptor
)
...
...
common/lib/xmodule/xmodule/tests/test_textannotation.py
View file @
7229ef92
...
@@ -60,12 +60,12 @@ class TextAnnotationModuleTestCase(unittest.TestCase):
...
@@ -60,12 +60,12 @@ class TextAnnotationModuleTestCase(unittest.TestCase):
xmltree
=
etree
.
fromstring
(
self
.
sample_xml
)
xmltree
=
etree
.
fromstring
(
self
.
sample_xml
)
expected_xml
=
u"<div><p>Test Instructions.</p></div>"
expected_xml
=
u"<div><p>Test Instructions.</p></div>"
actual_xml
=
self
.
mod
.
_extract_instructions
(
xmltree
)
# pylint: disable=
W0212
actual_xml
=
self
.
mod
.
_extract_instructions
(
xmltree
)
# pylint: disable=
protected-access
self
.
assertIsNotNone
(
actual_xml
)
self
.
assertIsNotNone
(
actual_xml
)
self
.
assertEqual
(
expected_xml
.
strip
(),
actual_xml
.
strip
())
self
.
assertEqual
(
expected_xml
.
strip
(),
actual_xml
.
strip
())
xmltree
=
etree
.
fromstring
(
'<annotatable>foo</annotatable>'
)
xmltree
=
etree
.
fromstring
(
'<annotatable>foo</annotatable>'
)
actual
=
self
.
mod
.
_extract_instructions
(
xmltree
)
# pylint: disable=
W0212
actual
=
self
.
mod
.
_extract_instructions
(
xmltree
)
# pylint: disable=
protected-access
self
.
assertIsNone
(
actual
)
self
.
assertIsNone
(
actual
)
def
test_student_view
(
self
):
def
test_student_view
(
self
):
...
...
common/lib/xmodule/xmodule/tests/test_video.py
View file @
7229ef92
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
# pylint: disable=
W0212
# pylint: disable=
protected-access
"""Test for Video Xmodule functional logic.
"""Test for Video Xmodule functional logic.
These test data read from xml, not from mongo.
These test data read from xml, not from mongo.
...
...
common/lib/xmodule/xmodule/tests/test_videoannotation.py
View file @
7229ef92
...
@@ -56,12 +56,12 @@ class VideoAnnotationModuleTestCase(unittest.TestCase):
...
@@ -56,12 +56,12 @@ class VideoAnnotationModuleTestCase(unittest.TestCase):
xmltree
=
etree
.
fromstring
(
self
.
sample_xml
)
xmltree
=
etree
.
fromstring
(
self
.
sample_xml
)
expected_xml
=
u"<div><p>Video Test Instructions.</p></div>"
expected_xml
=
u"<div><p>Video Test Instructions.</p></div>"
actual_xml
=
self
.
mod
.
_extract_instructions
(
xmltree
)
# pylint: disable=
W0212
actual_xml
=
self
.
mod
.
_extract_instructions
(
xmltree
)
# pylint: disable=
protected-access
self
.
assertIsNotNone
(
actual_xml
)
self
.
assertIsNotNone
(
actual_xml
)
self
.
assertEqual
(
expected_xml
.
strip
(),
actual_xml
.
strip
())
self
.
assertEqual
(
expected_xml
.
strip
(),
actual_xml
.
strip
())
xmltree
=
etree
.
fromstring
(
'<annotatable>foo</annotatable>'
)
xmltree
=
etree
.
fromstring
(
'<annotatable>foo</annotatable>'
)
actual
=
self
.
mod
.
_extract_instructions
(
xmltree
)
# pylint: disable=
W0212
actual
=
self
.
mod
.
_extract_instructions
(
xmltree
)
# pylint: disable=
protected-access
self
.
assertIsNone
(
actual
)
self
.
assertIsNone
(
actual
)
def
test_get_extension
(
self
):
def
test_get_extension
(
self
):
...
@@ -71,8 +71,8 @@ class VideoAnnotationModuleTestCase(unittest.TestCase):
...
@@ -71,8 +71,8 @@ class VideoAnnotationModuleTestCase(unittest.TestCase):
"""
"""
expectedyoutube
=
'video/youtube'
expectedyoutube
=
'video/youtube'
expectednotyoutube
=
'video/mp4'
expectednotyoutube
=
'video/mp4'
result1
=
self
.
mod
.
_get_extension
(
self
.
sample_sourceurl
)
# pylint: disable=
W0212
result1
=
self
.
mod
.
_get_extension
(
self
.
sample_sourceurl
)
# pylint: disable=
protected-access
result2
=
self
.
mod
.
_get_extension
(
self
.
sample_youtubeurl
)
# pylint: disable=
W0212
result2
=
self
.
mod
.
_get_extension
(
self
.
sample_youtubeurl
)
# pylint: disable=
protected-access
self
.
assertEqual
(
expectedyoutube
,
result2
)
self
.
assertEqual
(
expectedyoutube
,
result2
)
self
.
assertEqual
(
expectednotyoutube
,
result1
)
self
.
assertEqual
(
expectednotyoutube
,
result1
)
...
...
docs/en_us/developers/source/conf.py
View file @
7229ef92
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
# pylint: disable=invalid-name
# pylint: disable=invalid-name
# pylint: disable=W0622
# pylint: disable=W0622
# pylint: disable=
W0212
# pylint: disable=
protected-access
# pylint: disable=unused-argument
# pylint: disable=unused-argument
import
os
import
os
...
...
docs/en_us/platform_api/source/conf.py
View file @
7229ef92
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
# pylint: disable=invalid-name
# pylint: disable=invalid-name
# pylint: disable=W0622
# pylint: disable=W0622
# pylint: disable=
W0212
# pylint: disable=
protected-access
# pylint: disable=unused-argument
# pylint: disable=unused-argument
import
os
import
os
...
...
lms/djangoapps/course_wiki/middleware.py
View file @
7229ef92
...
@@ -98,5 +98,5 @@ class WikiAccessMiddleware(object):
...
@@ -98,5 +98,5 @@ class WikiAccessMiddleware(object):
response
=
self
.
_redirect_from_referrer
(
request
,
wiki_path
)
or
response
response
=
self
.
_redirect_from_referrer
(
request
,
wiki_path
)
or
response
# END HACK: _transform_url must be set to a no-op function after it's done its work
# END HACK: _transform_url must be set to a no-op function after it's done its work
reverse
.
_transform_url
=
lambda
url
:
url
# pylint: disable=
W0212
reverse
.
_transform_url
=
lambda
url
:
url
# pylint: disable=
protected-access
return
response
return
response
lms/djangoapps/courseware/tests/test_access.py
View file @
7229ef92
...
@@ -16,7 +16,7 @@ from xmodule.course_module import (
...
@@ -16,7 +16,7 @@ from xmodule.course_module import (
CATALOG_VISIBILITY_NONE
)
CATALOG_VISIBILITY_NONE
)
# pylint: disable=missing-docstring
# pylint: disable=missing-docstring
# pylint: disable=
W0212
# pylint: disable=
protected-access
class
AccessTestCase
(
TestCase
):
class
AccessTestCase
(
TestCase
):
...
...
lms/djangoapps/courseware/tests/test_video_xml.py
View file @
7229ef92
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
# pylint: disable=
W0212
# pylint: disable=
protected-access
"""Test for Video Xmodule functional logic.
"""Test for Video Xmodule functional logic.
These test data read from xml, not from mongo.
These test data read from xml, not from mongo.
...
...
lms/djangoapps/shoppingcart/admin.py
View file @
7229ef92
...
@@ -22,7 +22,7 @@ class SoftDeleteCouponAdmin(admin.ModelAdmin):
...
@@ -22,7 +22,7 @@ class SoftDeleteCouponAdmin(admin.ModelAdmin):
admin site. This is used by changelist_view. """
admin site. This is used by changelist_view. """
# Default: qs = self.model._default_manager.get_active_coupons_query_set()
# Default: qs = self.model._default_manager.get_active_coupons_query_set()
# Queryset with all the coupons including the soft-deletes: qs = self.model._default_manager.get_query_set()
# Queryset with all the coupons including the soft-deletes: qs = self.model._default_manager.get_query_set()
query_string
=
self
.
model
.
_default_manager
.
get_active_coupons_query_set
()
# pylint: disable=
W0212
query_string
=
self
.
model
.
_default_manager
.
get_active_coupons_query_set
()
# pylint: disable=
protected-access
return
query_string
return
query_string
def
get_actions
(
self
,
request
):
def
get_actions
(
self
,
request
):
...
...
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