Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-ora2
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-ora2
Commits
b891be00
Commit
b891be00
authored
Dec 17, 2014
by
muzaffaryousaf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing the failing test.
TNL-900
parent
6aeaeded
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
9 deletions
+3
-9
openassessment/xblock/test/test_staff_info.py
+3
-9
No files found.
openassessment/xblock/test/test_staff_info.py
View file @
b891be00
...
@@ -521,8 +521,9 @@ class TestCourseStaff(XBlockHandlerTestCase):
...
@@ -521,8 +521,9 @@ class TestCourseStaff(XBlockHandlerTestCase):
# If we're not course staff, we shouldn't be able to see the
# If we're not course staff, we shouldn't be able to see the
# cancel submission option
# cancel submission option
xblock
.
xmodule_runtime
=
self
.
_create_mock_runtime
(
xblock
.
xmodule_runtime
=
self
.
_create_mock_runtime
(
xblock
.
scope_ids
.
usage_id
,
Fals
e
,
False
,
"Bob"
xblock
.
scope_ids
.
usage_id
,
Tru
e
,
False
,
"Bob"
)
)
resp
=
self
.
request
(
xblock
,
'cancel_submission'
,
json
.
dumps
({}))
resp
=
self
.
request
(
xblock
,
'cancel_submission'
,
json
.
dumps
({}))
self
.
assertIn
(
"you do not have permission"
,
resp
.
decode
(
'utf-8'
)
.
lower
())
self
.
assertIn
(
"you do not have permission"
,
resp
.
decode
(
'utf-8'
)
.
lower
())
...
@@ -537,16 +538,9 @@ class TestCourseStaff(XBlockHandlerTestCase):
...
@@ -537,16 +538,9 @@ class TestCourseStaff(XBlockHandlerTestCase):
def
test_cancel_submission_full_flow
(
self
,
xblock
):
def
test_cancel_submission_full_flow
(
self
,
xblock
):
# Simulate that we are course staff
# Simulate that we are course staff
xblock
.
xmodule_runtime
=
self
.
_create_mock_runtime
(
xblock
.
xmodule_runtime
=
self
.
_create_mock_runtime
(
xblock
.
scope_ids
.
usage_id
,
Fals
e
,
False
,
"Bob"
xblock
.
scope_ids
.
usage_id
,
Tru
e
,
False
,
"Bob"
)
)
resp
=
self
.
request
(
xblock
,
'cancel_submission'
,
json
.
dumps
({}))
self
.
assertIn
(
"you do not have permission"
,
resp
.
decode
(
'utf-8'
)
.
lower
())
# If we ARE course staff, then we should see the cancel submission option
# with valid error message.
xblock
.
xmodule_runtime
.
user_is_staff
=
True
bob_item
=
STUDENT_ITEM
.
copy
()
bob_item
=
STUDENT_ITEM
.
copy
()
bob_item
[
"item_id"
]
=
xblock
.
scope_ids
.
usage_id
bob_item
[
"item_id"
]
=
xblock
.
scope_ids
.
usage_id
# Create a submission for Bob, and corresponding workflow.
# Create a submission for Bob, and corresponding workflow.
...
...
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