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
f03b943b
Commit
f03b943b
authored
Feb 16, 2015
by
stv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Pylint: W0612(unused-variable)
parent
79f9d1a7
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
9 additions
and
12 deletions
+9
-12
lms/djangoapps/certificates/management/commands/cert_whitelist.py
+1
-1
lms/djangoapps/certificates/management/commands/ungenerated_certs.py
+1
-1
lms/djangoapps/course_wiki/tests/tests.py
+0
-1
lms/djangoapps/courseware/tests/__init__.py
+1
-1
lms/djangoapps/django_comment_client/forum/tests.py
+2
-2
lms/djangoapps/instructor/tests/test_legacy_enrollment.py
+1
-1
lms/djangoapps/instructor/tests/test_tools.py
+1
-1
lms/djangoapps/instructor_task/tests/test_api.py
+0
-2
lms/djangoapps/lms_migration/management/commands/create_groups.py
+1
-1
lms/djangoapps/lms_migration/management/commands/create_user.py
+1
-1
No files found.
lms/djangoapps/certificates/management/commands/cert_whitelist.py
View file @
f03b943b
...
...
@@ -74,7 +74,7 @@ class Command(BaseCommand):
else
:
user
=
User
.
objects
.
get
(
username
=
user_str
)
cert_whitelist
,
created
=
\
cert_whitelist
,
_
created
=
\
CertificateWhitelist
.
objects
.
get_or_create
(
user
=
user
,
course_id
=
course
)
if
options
[
'add'
]:
...
...
lms/djangoapps/certificates/management/commands/ungenerated_certs.py
View file @
f03b943b
...
...
@@ -124,7 +124,7 @@ class Command(BaseCommand):
diff
=
datetime
.
datetime
.
now
(
UTC
)
-
start
timeleft
=
diff
*
(
total
-
count
)
/
STATUS_INTERVAL
hours
,
remainder
=
divmod
(
timeleft
.
seconds
,
3600
)
minutes
,
seconds
=
divmod
(
remainder
,
60
)
minutes
,
_
seconds
=
divmod
(
remainder
,
60
)
print
"{0}/{1} completed ~{2:02}:{3:02}m remaining"
.
format
(
count
,
total
,
hours
,
minutes
)
start
=
datetime
.
datetime
.
now
(
UTC
)
...
...
lms/djangoapps/course_wiki/tests/tests.py
View file @
f03b943b
...
...
@@ -92,7 +92,6 @@ class WikiRedirectTestCase(LoginEnrollmentTestCase, ModuleStoreTestCase):
course_wiki_page
=
referer
.
replace
(
'progress'
,
'wiki/'
+
self
.
toy
.
wiki_slug
+
"/"
)
ending_location
=
resp
.
redirect_chain
[
-
1
][
0
]
ending_status
=
resp
.
redirect_chain
[
-
1
][
1
]
self
.
assertEquals
(
ending_location
,
'http://testserver'
+
course_wiki_page
)
self
.
assertEquals
(
resp
.
status_code
,
200
)
...
...
lms/djangoapps/courseware/tests/__init__.py
View file @
f03b943b
...
...
@@ -106,7 +106,7 @@ class BaseTestXmodule(ModuleStoreTestCase):
# username = robot{0}, password = 'test'
self
.
users
=
[
UserFactory
.
create
()
for
i
in
range
(
self
.
USER_COUNT
)
for
dummy0
in
range
(
self
.
USER_COUNT
)
]
for
user
in
self
.
users
:
...
...
lms/djangoapps/django_comment_client/forum/tests.py
View file @
f03b943b
...
...
@@ -1085,7 +1085,7 @@ class UserProfileTestCase(ModuleStoreTestCase):
request
=
RequestFactory
()
.
get
(
"dummy_url"
)
request
.
user
=
self
.
student
with
self
.
assertRaises
(
Http404
):
response
=
views
.
user_profile
(
views
.
user_profile
(
request
,
self
.
course
.
id
.
to_deprecated_string
(),
-
999
...
...
@@ -1095,7 +1095,7 @@ class UserProfileTestCase(ModuleStoreTestCase):
request
=
RequestFactory
()
.
get
(
"dummy_url"
)
request
.
user
=
self
.
student
with
self
.
assertRaises
(
Http404
):
response
=
views
.
user_profile
(
views
.
user_profile
(
request
,
"non/existent/course"
,
self
.
profiled_user
.
id
...
...
lms/djangoapps/instructor/tests/test_legacy_enrollment.py
View file @
f03b943b
...
...
@@ -188,7 +188,7 @@ class TestInstructorEnrollsStudent(ModuleStoreTestCase, LoginEnrollmentTestCase)
"""
string
=
"abc@test.com, def@test.com ghi@test.com
\n
\n
jkl@test.com
\n
mno@test.com "
cleaned_string
,
cleaned_string_lc
=
get_and_clean_student_list
(
string
)
cleaned_string
,
_
cleaned_string_lc
=
get_and_clean_student_list
(
string
)
self
.
assertEqual
(
cleaned_string
,
[
'abc@test.com'
,
'def@test.com'
,
'ghi@test.com'
,
'jkl@test.com'
,
'mno@test.com'
])
@ddt.data
(
'http'
,
'https'
)
...
...
lms/djangoapps/instructor/tests/test_tools.py
View file @
f03b943b
...
...
@@ -148,7 +148,7 @@ class TestGetUnitsWithDueDate(ModuleStoreTestCase):
week1
=
ItemFactory
.
create
(
due
=
due
,
parent
=
course
)
week2
=
ItemFactory
.
create
(
due
=
due
,
parent
=
course
)
homework
=
ItemFactory
.
create
(
ItemFactory
.
create
(
parent
=
week1
,
due
=
due
)
...
...
lms/djangoapps/instructor_task/tests/test_api.py
View file @
f03b943b
...
...
@@ -82,7 +82,6 @@ class InstructorTaskModuleSubmitTest(InstructorTaskModuleTestCase):
def
test_submit_nonexistent_modules
(
self
):
# confirm that a rescore of a non-existent module returns an exception
problem_url
=
InstructorTaskModuleTestCase
.
problem_location
(
"NonexistentProblem"
)
course_id
=
self
.
course
.
id
request
=
None
with
self
.
assertRaises
(
ItemNotFoundError
):
submit_rescore_problem_for_student
(
request
,
problem_url
,
self
.
student
)
...
...
@@ -98,7 +97,6 @@ class InstructorTaskModuleSubmitTest(InstructorTaskModuleTestCase):
# (Note that it is easier to test a scoreable but non-rescorable module in test_tasks,
# where we are creating real modules.)
problem_url
=
self
.
problem_section
.
location
course_id
=
self
.
course
.
id
request
=
None
with
self
.
assertRaises
(
NotImplementedError
):
submit_rescore_problem_for_student
(
request
,
problem_url
,
self
.
student
)
...
...
lms/djangoapps/lms_migration/management/commands/create_groups.py
View file @
f03b943b
...
...
@@ -31,7 +31,7 @@ def create_groups():
cxfn
=
path
(
data_dir
)
/
course_dir
/
'course.xml'
try
:
coursexml
=
etree
.
parse
(
cxfn
)
except
Exception
as
err
:
except
Exception
:
print
"Oops, cannot read
%
s, skipping"
%
cxfn
continue
cxmlroot
=
coursexml
.
getroot
()
...
...
lms/djangoapps/lms_migration/management/commands/create_user.py
View file @
f03b943b
...
...
@@ -44,7 +44,7 @@ class MyCompleter(object): # Custom completer
def
GenPasswd
(
length
=
8
,
chars
=
string
.
letters
+
string
.
digits
):
return
''
.
join
([
choice
(
chars
)
for
i
in
range
(
length
)])
return
''
.
join
([
choice
(
chars
)
for
dummy0
in
range
(
length
)])
#-----------------------------------------------------------------------------
# main command
...
...
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