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
c2aa0bf6
Commit
c2aa0bf6
authored
Feb 04, 2014
by
cahrens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pep8 cleanup
parent
5dfe9d70
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
6 additions
and
5 deletions
+6
-5
cms/djangoapps/contentstore/views/tests/test_access.py
+1
-0
cms/djangoapps/contentstore/views/tests/test_assets.py
+1
-0
cms/djangoapps/contentstore/views/tests/test_checklists.py
+0
-1
cms/djangoapps/contentstore/views/tests/test_course_index.py
+1
-1
cms/djangoapps/contentstore/views/tests/test_course_updates.py
+0
-1
cms/djangoapps/contentstore/views/tests/test_import_export.py
+2
-1
cms/djangoapps/contentstore/views/tests/test_user.py
+1
-1
No files found.
cms/djangoapps/contentstore/views/tests/test_access.py
View file @
c2aa0bf6
...
@@ -11,6 +11,7 @@ from student.tests.factories import AdminFactory
...
@@ -11,6 +11,7 @@ from student.tests.factories import AdminFactory
from
student.auth
import
add_users
from
student.auth
import
add_users
from
contentstore.views.access
import
get_user_role
from
contentstore.views.access
import
get_user_role
class
RolesTest
(
TestCase
):
class
RolesTest
(
TestCase
):
"""
"""
Tests for user roles.
Tests for user roles.
...
...
cms/djangoapps/contentstore/views/tests/test_assets.py
View file @
c2aa0bf6
...
@@ -114,6 +114,7 @@ class PaginationTestCase(AssetsTestCase):
...
@@ -114,6 +114,7 @@ class PaginationTestCase(AssetsTestCase):
self
.
assertGreaterEqual
(
name1
,
name2
)
self
.
assertGreaterEqual
(
name1
,
name2
)
self
.
assertGreaterEqual
(
name2
,
name3
)
self
.
assertGreaterEqual
(
name2
,
name3
)
class
UploadTestCase
(
AssetsTestCase
):
class
UploadTestCase
(
AssetsTestCase
):
"""
"""
Unit tests for uploading a file
Unit tests for uploading a file
...
...
cms/djangoapps/contentstore/views/tests/test_checklists.py
View file @
c2aa0bf6
...
@@ -113,7 +113,6 @@ class ChecklistTestCase(CourseTestCase):
...
@@ -113,7 +113,6 @@ class ChecklistTestCase(CourseTestCase):
self
.
assertEqual
(
'CourseOutline'
,
get_first_item
(
persisted_checklist
)
.
get
(
'action_url'
))
self
.
assertEqual
(
'CourseOutline'
,
get_first_item
(
persisted_checklist
)
.
get
(
'action_url'
))
self
.
compare_checklists
(
persisted_checklist
,
returned_checklist
)
self
.
compare_checklists
(
persisted_checklist
,
returned_checklist
)
def
test_update_checklists_delete_unsupported
(
self
):
def
test_update_checklists_delete_unsupported
(
self
):
""" Delete operation is not supported. """
""" Delete operation is not supported. """
update_url
=
self
.
location
.
url_reverse
(
'checklists/'
,
'100'
)
update_url
=
self
.
location
.
url_reverse
(
'checklists/'
,
'100'
)
...
...
cms/djangoapps/contentstore/views/tests/test_course_index.py
View file @
c2aa0bf6
...
@@ -9,6 +9,7 @@ from xmodule.modulestore.django import loc_mapper
...
@@ -9,6 +9,7 @@ from xmodule.modulestore.django import loc_mapper
from
xmodule.modulestore.tests.factories
import
CourseFactory
,
ItemFactory
from
xmodule.modulestore.tests.factories
import
CourseFactory
,
ItemFactory
from
xmodule.modulestore
import
parsers
from
xmodule.modulestore
import
parsers
class
TestCourseIndex
(
CourseTestCase
):
class
TestCourseIndex
(
CourseTestCase
):
"""
"""
Unit tests for getting the list of courses and the course outline.
Unit tests for getting the list of courses and the course outline.
...
@@ -25,7 +26,6 @@ class TestCourseIndex(CourseTestCase):
...
@@ -25,7 +26,6 @@ class TestCourseIndex(CourseTestCase):
display_name
=
'dotted.course.name-2'
,
display_name
=
'dotted.course.name-2'
,
)
)
def
check_index_and_outline
(
self
,
authed_client
):
def
check_index_and_outline
(
self
,
authed_client
):
"""
"""
Test getting the list of courses and then pulling up their outlines
Test getting the list of courses and then pulling up their outlines
...
...
cms/djangoapps/contentstore/views/tests/test_course_updates.py
View file @
c2aa0bf6
...
@@ -53,7 +53,6 @@ class CourseUpdateTest(CourseTestCase):
...
@@ -53,7 +53,6 @@ class CourseUpdateTest(CourseTestCase):
content
,
json
.
loads
(
refetched
.
content
)[
'content'
],
"get w/ provided id"
content
,
json
.
loads
(
refetched
.
content
)[
'content'
],
"get w/ provided id"
)
)
# now put in an evil update
# now put in an evil update
content
=
'<ol/>'
content
=
'<ol/>'
payload
=
get_response
(
content
,
'January 11, 2013'
)
payload
=
get_response
(
content
,
'January 11, 2013'
)
...
...
cms/djangoapps/contentstore/views/tests/test_import_export.py
View file @
c2aa0bf6
...
@@ -25,6 +25,7 @@ TEST_DATA_CONTENTSTORE['DOC_STORE_CONFIG']['db'] = 'test_xcontent_%s' % uuid4().
...
@@ -25,6 +25,7 @@ TEST_DATA_CONTENTSTORE['DOC_STORE_CONFIG']['db'] = 'test_xcontent_%s' % uuid4().
log
=
logging
.
getLogger
(
__name__
)
log
=
logging
.
getLogger
(
__name__
)
@override_settings
(
CONTENTSTORE
=
TEST_DATA_CONTENTSTORE
)
@override_settings
(
CONTENTSTORE
=
TEST_DATA_CONTENTSTORE
)
class
ImportTestCase
(
CourseTestCase
):
class
ImportTestCase
(
CourseTestCase
):
"""
"""
...
@@ -178,7 +179,7 @@ class ImportTestCase(CourseTestCase):
...
@@ -178,7 +179,7 @@ class ImportTestCase(CourseTestCase):
def
try_tar
(
tarpath
):
def
try_tar
(
tarpath
):
with
open
(
tarpath
)
as
tar
:
with
open
(
tarpath
)
as
tar
:
args
=
{
"name"
:
tarpath
,
"course-data"
:
[
tar
]
}
args
=
{
"name"
:
tarpath
,
"course-data"
:
[
tar
]
}
resp
=
self
.
client
.
post
(
self
.
url
,
args
)
resp
=
self
.
client
.
post
(
self
.
url
,
args
)
self
.
assertEquals
(
resp
.
status_code
,
400
)
self
.
assertEquals
(
resp
.
status_code
,
400
)
self
.
assertTrue
(
"SuspiciousFileOperation"
in
resp
.
content
)
self
.
assertTrue
(
"SuspiciousFileOperation"
in
resp
.
content
)
...
...
cms/djangoapps/contentstore/views/tests/test_user.py
View file @
c2aa0bf6
...
@@ -3,7 +3,7 @@ Tests for contentstore/views/user.py.
...
@@ -3,7 +3,7 @@ Tests for contentstore/views/user.py.
"""
"""
import
json
import
json
from
contentstore.tests.utils
import
CourseTestCase
from
contentstore.tests.utils
import
CourseTestCase
from
django.contrib.auth.models
import
User
,
Group
from
django.contrib.auth.models
import
User
from
student.models
import
CourseEnrollment
from
student.models
import
CourseEnrollment
from
xmodule.modulestore.django
import
loc_mapper
from
xmodule.modulestore.django
import
loc_mapper
from
student.roles
import
CourseStaffRole
,
CourseInstructorRole
from
student.roles
import
CourseStaffRole
,
CourseInstructorRole
...
...
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