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
b63aae22
Commit
b63aae22
authored
Mar 29, 2013
by
Jay Zoldak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
small pep8 pylint and superclass fixes
parent
5bf839c9
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
10 deletions
+5
-10
cms/djangoapps/contentstore/tests/utils.py
+4
-4
lms/djangoapps/courseware/mock_xqueue_server/test_mock_xqueue_server.py
+0
-1
lms/djangoapps/courseware/tests/tests.py
+1
-5
No files found.
cms/djangoapps/contentstore/tests/utils.py
View file @
b63aae22
...
...
@@ -32,7 +32,7 @@ class ModuleStoreTestCase(TestCase):
# This query means: every item in the collection
# that is not a template
query
=
{
"_id.course"
:
{
"$ne"
:
"templates"
}}
query
=
{
"_id.course"
:
{
"$ne"
:
"templates"
}}
# Remove everything except templates
modulestore
.
collection
.
remove
(
query
)
...
...
@@ -47,7 +47,7 @@ class ModuleStoreTestCase(TestCase):
modulestore
=
xmodule
.
modulestore
.
django
.
modulestore
()
# Count the number of templates
query
=
{
"_id.course"
:
"templates"
}
query
=
{
"_id.course"
:
"templates"
}
num_templates
=
modulestore
.
collection
.
find
(
query
)
.
count
()
if
num_templates
<
1
:
...
...
@@ -96,7 +96,7 @@ class ModuleStoreTestCase(TestCase):
ModuleStoreTestCase
.
load_templates_if_necessary
()
# Call superclass implementation
TestCase
.
_pre_setup
(
self
)
super
(
ModuleStoreTestCase
,
self
)
.
_pre_setup
(
)
def
_post_teardown
(
self
):
'''
...
...
@@ -106,7 +106,7 @@ class ModuleStoreTestCase(TestCase):
ModuleStoreTestCase
.
flush_mongo_except_templates
()
# Call superclass implementation
TestCase
.
_post_teardown
(
self
)
super
(
ModuleStoreTestCase
,
self
)
.
_post_teardown
(
)
def
parse_json
(
response
):
...
...
lms/djangoapps/courseware/mock_xqueue_server/test_mock_xqueue_server.py
View file @
b63aae22
...
...
@@ -3,7 +3,6 @@ import unittest
import
threading
import
json
import
urllib
import
urlparse
import
time
from
mock_xqueue_server
import
MockXQueueServer
,
MockXQueueRequestHandler
...
...
lms/djangoapps/courseware/tests/tests.py
View file @
b63aae22
...
...
@@ -287,7 +287,6 @@ class PageLoaderTestCase(LoginEnrollmentTestCase):
self
.
enroll
(
course
)
course_id
=
course
.
id
# Search for items in the course
# None is treated as a wildcard
course_loc
=
course
.
location
...
...
@@ -301,7 +300,6 @@ class PageLoaderTestCase(LoginEnrollmentTestCase):
else
:
descriptor
=
random
.
choice
(
items
)
# We have ancillary course information now as modules
# and we can't simply use 'jump_to' to view them
if
descriptor
.
location
.
category
==
'about'
:
...
...
@@ -330,7 +328,6 @@ class PageLoaderTestCase(LoginEnrollmentTestCase):
expect_redirect
=
True
,
check_content
=
True
)
def
_assert_loads
(
self
,
django_url
,
kwargs
,
descriptor
,
expect_redirect
=
False
,
check_content
=
False
):
...
...
@@ -390,7 +387,6 @@ class TestCoursesLoadTestCase_MongoModulestore(PageLoaderTestCase):
self
.
check_random_page_loads
(
module_store
)
@override_settings
(
MODULESTORE
=
TEST_DATA_XML_MODULESTORE
)
class
TestNavigation
(
LoginEnrollmentTestCase
):
"""Check that navigation state is saved properly"""
...
...
@@ -642,7 +638,7 @@ class TestViewAuth(LoginEnrollmentTestCase):
print
'=== Checking non-staff access for {0}'
.
format
(
course
.
id
)
# Randomly sample a dark url
url
=
random
.
choice
(
instructor_urls
(
course
)
+
url
=
random
.
choice
(
instructor_urls
(
course
)
+
dark_student_urls
(
course
)
+
reverse_urls
([
'courseware'
],
course
))
print
'checking for 404 on {0}'
.
format
(
url
)
...
...
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