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
566d2c95
Commit
566d2c95
authored
Nov 17, 2015
by
Andy Armstrong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests
parent
b0dfb612
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
15 deletions
+9
-15
openassessment/xblock/submission_mixin.py
+0
-1
openassessment/xblock/test/test_submission.py
+9
-14
No files found.
openassessment/xblock/submission_mixin.py
View file @
566d2c95
...
...
@@ -6,7 +6,6 @@ from xblock.core import XBlock
from
submissions
import
api
from
openassessment.fileupload
import
api
as
file_upload_api
from
openassessment.fileupload.exceptions
import
FileUploadError
from
openassessment.workflow
import
api
as
workflow_api
from
openassessment.workflow.errors
import
AssessmentWorkflowError
from
.resolve_dates
import
DISTANT_FUTURE
...
...
openassessment/xblock/test/test_submission.py
View file @
566d2c95
...
...
@@ -318,23 +318,17 @@ class SubmissionRenderTest(XBlockHandlerTestCase):
@scenario
(
'data/submission_open.xml'
,
user_id
=
"Bob"
)
def
test_cancelled_submission
(
self
,
xblock
):
student_item
=
xblock
.
get_student_item_dict
()
mock_staff
=
Mock
(
name
=
'Bob'
)
xblock
.
get_username
=
Mock
(
return_value
=
mock_staff
)
submission
=
xblock
.
create_submission
(
student_item
,
(
'A man must have a code'
,
'A man must have an umbrella too.'
)
)
xblock
.
get_workflow_info
=
Mock
(
return_value
=
{
'status'
:
'cancelled'
,
'submission_uuid'
:
submission
[
'uuid'
]
})
xblock
.
get_username
=
Mock
(
return_value
=
'Bob'
)
workflow_api
.
get_assessment_workflow_cancellation
=
Mock
(
return_value
=
{
'comments'
:
'Inappropriate language'
,
'cancelled_by_id'
:
'Bob'
,
'created_at'
:
dt
.
datetime
(
2999
,
5
,
6
)
.
replace
(
tzinfo
=
pytz
.
utc
),
'cancelled_by'
:
'Bob'
})
workflow_api
.
cancel_workflow
(
submission_uuid
=
submission
[
'uuid'
],
comments
=
'Inappropriate language'
,
cancelled_by_id
=
'Bob'
,
assessment_requirements
=
xblock
.
workflow_requirements
()
)
self
.
_assert_path_and_context
(
xblock
,
'openassessmentblock/response/oa_response_cancelled.html'
,
...
...
@@ -347,8 +341,9 @@ class SubmissionRenderTest(XBlockHandlerTestCase):
'student_submission'
:
submission
,
'workflow_cancellation'
:
{
'comments'
:
'Inappropriate language'
,
'cancelled_at'
:
xblock
.
get_workflow_cancellation_info
(
submission
[
'uuid'
])
.
get
(
'cancelled_at'
),
'cancelled_by_id'
:
'Bob'
,
'cancelled_by'
:
'Bob'
'cancelled_by'
:
mock_staff
}
}
)
...
...
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