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
30aede6f
Commit
30aede6f
authored
Feb 10, 2014
by
Ned Batchelder
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2541 from edx/ned/remove-unused-imports
Remove unused imports.
parents
70b602fb
1bd213be
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
15 additions
and
55 deletions
+15
-55
lms/djangoapps/course_wiki/tests/tests.py
+0
-2
lms/djangoapps/courseware/access.py
+1
-2
lms/djangoapps/courseware/admin.py
+0
-1
lms/djangoapps/courseware/courses.py
+0
-1
lms/djangoapps/courseware/management/commands/export_course.py
+0
-1
lms/djangoapps/courseware/mock_lti_server/server_start.py
+0
-1
lms/djangoapps/courseware/mock_lti_server/test_mock_lti_server.py
+0
-3
lms/djangoapps/courseware/tests/test_microsites.py
+0
-1
lms/djangoapps/courseware/tests/test_submitting_problems.py
+0
-1
lms/djangoapps/courseware/views.py
+3
-5
lms/djangoapps/django_comment_client/base/views.py
+0
-2
lms/djangoapps/django_comment_client/helpers.py
+0
-8
lms/djangoapps/foldit/tests.py
+1
-1
lms/djangoapps/instructor/management/tests/test_openended_commands.py
+1
-1
lms/djangoapps/instructor/views/instructor_dashboard.py
+0
-1
lms/djangoapps/instructor/views/legacy.py
+0
-1
lms/djangoapps/shoppingcart/models.py
+1
-2
lms/djangoapps/shoppingcart/tests/test_models.py
+1
-3
lms/djangoapps/shoppingcart/tests/test_views.py
+1
-1
lms/djangoapps/shoppingcart/urls.py
+1
-1
lms/djangoapps/verify_student/models.py
+0
-2
lms/djangoapps/verify_student/tests/test_models.py
+2
-7
lms/djangoapps/verify_student/tests/test_views.py
+1
-1
lms/djangoapps/verify_student/urls.py
+1
-2
lms/djangoapps/verify_student/views.py
+0
-3
lms/envs/acceptance.py
+1
-1
No files found.
lms/djangoapps/course_wiki/tests/tests.py
View file @
30aede6f
from
django.core.urlresolvers
import
reverse
from
django.test.utils
import
override_settings
import
xmodule.modulestore.django
from
courseware.tests.tests
import
LoginEnrollmentTestCase
from
courseware.tests.modulestore_config
import
TEST_DATA_MIXED_MODULESTORE
from
xmodule.modulestore.django
import
modulestore
...
...
lms/djangoapps/courseware/access.py
View file @
30aede6f
...
...
@@ -3,10 +3,9 @@ Ideally, it will be the only place that needs to know about any special settings
like DISABLE_START_DATES"""
import
logging
from
datetime
import
datetime
,
timedelta
from
functools
import
partial
from
django.conf
import
settings
from
django.contrib.auth.models
import
Group
,
AnonymousUser
from
django.contrib.auth.models
import
AnonymousUser
from
xmodule.course_module
import
CourseDescriptor
from
xmodule.error_module
import
ErrorDescriptor
...
...
lms/djangoapps/courseware/admin.py
View file @
30aede6f
...
...
@@ -4,7 +4,6 @@ django admin pages for courseware model
from
courseware.models
import
StudentModule
,
OfflineComputedGrade
,
OfflineComputedGradeLog
from
ratelimitbackend
import
admin
from
django.contrib.auth.models
import
User
admin
.
site
.
register
(
StudentModule
)
...
...
lms/djangoapps/courseware/courses.py
View file @
30aede6f
...
...
@@ -2,7 +2,6 @@ from collections import defaultdict
from
fs.errors
import
ResourceNotFoundError
import
logging
import
inspect
import
re
from
path
import
path
from
django.http
import
Http404
...
...
lms/djangoapps/courseware/management/commands/export_course.py
View file @
30aede6f
...
...
@@ -16,7 +16,6 @@ from path import path
from
django.core.management.base
import
BaseCommand
,
CommandError
from
xmodule.modulestore.django
import
modulestore
from
xmodule.contentstore.django
import
contentstore
from
xmodule.modulestore.xml_exporter
import
export_to_xml
...
...
lms/djangoapps/courseware/mock_lti_server/server_start.py
View file @
30aede6f
...
...
@@ -4,7 +4,6 @@ Mock LTI server for manual testing.
Used for manual testing and testing on sandbox.
"""
import
threading
from
mock_lti_server
import
MockLTIServer
server_port
=
8034
...
...
lms/djangoapps/courseware/mock_lti_server/test_mock_lti_server.py
View file @
30aede6f
"""
Test for Mock_LTI_Server
"""
import
mock
from
mock
import
Mock
import
unittest
import
threading
import
textwrap
import
urllib
import
requests
from
mock_lti_server
import
MockLTIServer
...
...
lms/djangoapps/courseware/tests/test_microsites.py
View file @
30aede6f
...
...
@@ -3,7 +3,6 @@ Tests related to the Microsites feature
"""
from
django.core.urlresolvers
import
reverse
from
django.test.utils
import
override_settings
from
unittest
import
skip
from
xmodule.modulestore.tests.factories
import
CourseFactory
,
ItemFactory
...
...
lms/djangoapps/courseware/tests/test_submitting_problems.py
View file @
30aede6f
...
...
@@ -17,7 +17,6 @@ from django.test.utils import override_settings
# Need access to internal func to put users in the right group
from
courseware
import
grades
from
courseware.model_data
import
FieldDataCache
from
courseware.models
import
StudentModule
from
xmodule.modulestore.django
import
modulestore
,
editable_modulestore
...
...
lms/djangoapps/courseware/views.py
View file @
30aede6f
import
logging
import
urllib
from
functools
import
partial
from
collections
import
defaultdict
from
django.conf
import
settings
...
...
@@ -10,7 +9,7 @@ from django.core.exceptions import PermissionDenied
from
django.core.urlresolvers
import
reverse
from
django.contrib.auth.models
import
User
from
django.contrib.auth.decorators
import
login_required
from
django.http
import
Http404
,
HttpResponse
,
HttpResponseRedirect
from
django.http
import
Http404
,
HttpResponse
from
django.shortcuts
import
redirect
from
edxmako.shortcuts
import
render_to_response
,
render_to_string
from
django_future.csrf
import
ensure_csrf_cookie
...
...
@@ -20,12 +19,11 @@ from markupsafe import escape
from
courseware
import
grades
from
courseware.access
import
has_access
from
courseware.courses
import
(
get_courses
,
get_course_with_access
,
get_courses_by_university
,
sort_by_announcement
)
from
courseware.courses
import
get_courses
,
get_course_with_access
,
sort_by_announcement
import
courseware.tabs
as
tabs
from
courseware.masquerade
import
setup_masquerade
from
courseware.model_data
import
FieldDataCache
from
.module_render
import
toc_for_course
,
get_module_for_descriptor
,
get_module
from
.module_render
import
toc_for_course
,
get_module_for_descriptor
from
courseware.models
import
StudentModule
,
StudentModuleHistory
from
course_modes.models
import
CourseMode
...
...
lms/djangoapps/django_comment_client/base/views.py
View file @
30aede6f
...
...
@@ -17,7 +17,6 @@ from django.views.decorators.http import require_POST, require_GET
from
django.views.decorators
import
csrf
from
django.core.files.storage
import
get_storage_class
from
django.utils.translation
import
ugettext
as
_
from
django.contrib.auth.models
import
User
from
edxmako.shortcuts
import
render_to_string
from
courseware.courses
import
get_course_with_access
,
get_course_by_id
...
...
@@ -26,7 +25,6 @@ from course_groups.cohorts import get_cohort_id, is_commentable_cohorted
from
django_comment_client.utils
import
JsonResponse
,
JsonError
,
extract
,
add_courseware_context
from
django_comment_client.permissions
import
check_permissions_by_view
,
cached_has_permission
from
django_comment_common.models
import
Role
from
courseware.access
import
has_access
log
=
logging
.
getLogger
(
__name__
)
...
...
lms/djangoapps/django_comment_client/helpers.py
View file @
30aede6f
from
django.conf
import
settings
from
.mustache_helpers
import
mustache_helpers
from
functools
import
partial
from
mako.template
import
Template
from
.utils
import
extend_content
,
merge_dict
,
render_mustache
import
django_comment_client.settings
as
cc_settings
import
pystache_custom
as
pystache
import
urllib
import
os
...
...
@@ -30,4 +23,3 @@ def include_mustache_templates():
for
file_name
in
os
.
listdir
(
mustache_dir
)
if
is_valid_file_name
(
file_name
)
)
lms/djangoapps/foldit/tests.py
View file @
30aede6f
...
...
@@ -9,7 +9,7 @@ from django.core.urlresolvers import reverse
from
foldit.views
import
foldit_ops
,
verify_code
from
foldit.models
import
PuzzleComplete
,
Score
from
student.models
import
unique_id_for_user
from
student.tests.factories
import
CourseEnrollmentFactory
,
UserFactory
,
UserProfileFactory
from
student.tests.factories
import
CourseEnrollmentFactory
,
UserFactory
from
datetime
import
datetime
,
timedelta
from
pytz
import
UTC
...
...
lms/djangoapps/instructor/management/tests/test_openended_commands.py
View file @
30aede6f
...
...
@@ -2,7 +2,7 @@
from
datetime
import
datetime
import
json
from
mock
import
patch
,
ANY
from
mock
import
patch
from
pytz
import
UTC
from
django.test.utils
import
override_settings
...
...
lms/djangoapps/instructor/views/instructor_dashboard.py
View file @
30aede6f
"""
Instructor Dashboard Views
"""
from
functools
import
partial
from
django.utils.translation
import
ugettext
as
_
from
django_future.csrf
import
ensure_csrf_cookie
...
...
lms/djangoapps/instructor/views/legacy.py
View file @
30aede6f
...
...
@@ -9,7 +9,6 @@ import re
import
requests
from
collections
import
defaultdict
,
OrderedDict
from
functools
import
partial
from
markupsafe
import
escape
from
requests.status_codes
import
codes
from
StringIO
import
StringIO
...
...
lms/djangoapps/shoppingcart/models.py
View file @
30aede6f
...
...
@@ -6,7 +6,6 @@ from decimal import Decimal
import
pytz
import
logging
import
smtplib
import
unicodecsv
from
boto.exception
import
BotoServerError
# this is a super-class of SESError and catches connection errors
from
django.dispatch
import
receiver
...
...
@@ -34,7 +33,7 @@ from util.query import use_read_replica_if_available
from
verify_student.models
import
SoftwareSecurePhotoVerification
from
.exceptions
import
(
InvalidCartItem
,
PurchasedCallbackException
,
ItemAlreadyInCartException
,
AlreadyEnrolledInCourseException
,
CourseDoesNotExistException
,
ReportException
)
AlreadyEnrolledInCourseException
,
CourseDoesNotExistException
)
from
microsite_configuration.middleware
import
MicrositeConfiguration
...
...
lms/djangoapps/shoppingcart/tests/test_models.py
View file @
30aede6f
...
...
@@ -2,8 +2,6 @@
Tests for the Shopping Cart Models
"""
import
smtplib
import
StringIO
from
textwrap
import
dedent
from
boto.exception
import
BotoServerError
# this is a super-class of SESError and catches connection errors
from
mock
import
patch
,
MagicMock
,
sentinel
...
...
@@ -17,7 +15,7 @@ from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
from
xmodule.modulestore.tests.factories
import
CourseFactory
from
courseware.tests.tests
import
TEST_DATA_MONGO_MODULESTORE
from
shoppingcart.models
import
(
Order
,
OrderItem
,
CertificateItem
,
InvalidCartItem
,
PaidCourseRegistration
,
OrderItemSubclassPK
,
PaidCourseRegistrationAnnotation
)
OrderItemSubclassPK
)
from
student.tests.factories
import
UserFactory
from
student.models
import
CourseEnrollment
from
course_modes.models
import
CourseMode
...
...
lms/djangoapps/shoppingcart/tests/test_views.py
View file @
30aede6f
...
...
@@ -20,7 +20,7 @@ from student.models import CourseEnrollment
from
course_modes.models
import
CourseMode
from
edxmako.shortcuts
import
render_to_response
from
shoppingcart.processors
import
render_purchase_form_html
from
mock
import
patch
,
Mock
,
sentinel
from
mock
import
patch
,
Mock
from
shoppingcart.views
import
initialize_report
...
...
lms/djangoapps/shoppingcart/urls.py
View file @
30aede6f
from
django.conf.urls
import
patterns
,
include
,
url
from
django.conf.urls
import
patterns
,
url
from
django.conf
import
settings
urlpatterns
=
patterns
(
'shoppingcart.views'
,
# nopep8
...
...
lms/djangoapps/verify_student/models.py
View file @
30aede6f
...
...
@@ -10,8 +10,6 @@ photo verification process as generic as possible.
"""
from
datetime
import
datetime
,
timedelta
from
email.utils
import
formatdate
from
hashlib
import
md5
import
base64
import
functools
import
json
import
logging
...
...
lms/djangoapps/verify_student/tests/test_models.py
View file @
30aede6f
...
...
@@ -2,11 +2,8 @@
from
datetime
import
timedelta
,
datetime
import
json
from
xmodule.modulestore.tests.factories
import
CourseFactory
from
nose.tools
import
(
assert_in
,
assert_is_none
,
assert_equals
,
assert_not_equals
,
assert_raises
,
assert_true
,
assert_false
)
from
mock
import
MagicMock
,
patch
from
nose.tools
import
assert_is_none
,
assert_equals
,
assert_raises
,
assert_true
,
assert_false
from
mock
import
patch
import
pytz
from
django.test
import
TestCase
from
courseware.tests.tests
import
TEST_DATA_MONGO_MODULESTORE
...
...
@@ -20,8 +17,6 @@ from verify_student.models import (
SoftwareSecurePhotoVerification
,
VerificationException
,
)
from
reverification.tests.factories
import
MidcourseReverificationWindowFactory
from
util.testing
import
UrlResetMixin
import
verify_student.models
FAKE_SETTINGS
=
{
"SOFTWARE_SECURE"
:
{
...
...
lms/djangoapps/verify_student/tests/test_views.py
View file @
30aede6f
...
...
@@ -10,7 +10,7 @@ verify_student/start?course_id=MITx/6.002x/2013_Spring # create
"""
import
urllib
from
mock
import
patch
,
Mock
,
ANY
from
mock
import
patch
,
Mock
import
pytz
from
datetime
import
timedelta
,
datetime
...
...
lms/djangoapps/verify_student/urls.py
View file @
30aede6f
from
django.conf.urls
import
include
,
patterns
,
url
from
django.views.generic
import
TemplateView
from
django.conf.urls
import
patterns
,
url
from
verify_student
import
views
...
...
lms/djangoapps/verify_student/views.py
View file @
30aede6f
...
...
@@ -6,8 +6,6 @@ import json
import
logging
import
decimal
import
datetime
import
crum
from
track.views
import
server_track
from
pytz
import
UTC
from
edxmako.shortcuts
import
render_to_response
...
...
@@ -21,7 +19,6 @@ from django.views.decorators.http import require_POST
from
django.views.generic.base
import
View
from
django.utils.decorators
import
method_decorator
from
django.utils.translation
import
ugettext
as
_
from
django.utils.http
import
urlencode
from
django.contrib.auth.decorators
import
login_required
from
course_modes.models
import
CourseMode
...
...
lms/envs/acceptance.py
View file @
30aede6f
...
...
@@ -19,7 +19,7 @@ import logging
logging
.
basicConfig
(
filename
=
TEST_ROOT
/
"log"
/
"lms_acceptance.log"
,
level
=
logging
.
ERROR
)
import
os
from
random
import
choice
,
randint
from
random
import
choice
import
string
...
...
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