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
6a499805
You need to sign in or sign up before continuing.
Commit
6a499805
authored
11 years ago
by
cahrens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tests for permissions.
parent
5cd90d58
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
cms/djangoapps/course_creators/tests/test_admin.py
+23
-0
No files found.
cms/djangoapps/course_creators/tests/test_admin.py
View file @
6a499805
...
...
@@ -64,3 +64,26 @@ class CourseCreatorAdminTest(TestCase):
# and change state back to 'u' (unrequested)
change_state
(
'u'
,
False
)
def
test_add_permission
(
self
):
"""
Tests that staff cannot add entries
"""
self
.
assertFalse
(
self
.
creator_admin
.
has_add_permission
(
self
.
request
))
def
test_delete_permission
(
self
):
"""
Tests that staff cannot delete entries
"""
self
.
assertFalse
(
self
.
creator_admin
.
has_delete_permission
(
self
.
request
))
def
test_change_permission
(
self
):
"""
Tests that only staff can change entries
"""
self
.
assertTrue
(
self
.
creator_admin
.
has_change_permission
(
self
.
request
))
self
.
request
.
user
=
self
.
user
self
.
assertFalse
(
self
.
creator_admin
.
has_change_permission
(
self
.
request
))
This diff is collapsed.
Click to expand it.
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