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
1d3ba140
Commit
1d3ba140
authored
Dec 03, 2015
by
Eric Fischer
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #803 from edx/efischer/premade_workflow_test
Adding "no start_workflow()" test
parents
04c1c387
9ea4816f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
openassessment/workflow/test/test_api.py
+24
-0
No files found.
openassessment/workflow/test/test_api.py
View file @
1d3ba140
...
@@ -278,6 +278,30 @@ class TestAssessmentWorkflowApi(CacheResetTest):
...
@@ -278,6 +278,30 @@ class TestAssessmentWorkflowApi(CacheResetTest):
workflow
=
workflow_api
.
create_workflow
(
submission
[
"uuid"
],
data
[
"steps"
],
ON_INIT_PARAMS
)
workflow
=
workflow_api
.
create_workflow
(
submission
[
"uuid"
],
data
[
"steps"
],
ON_INIT_PARAMS
)
workflow_api
.
get_workflow_for_submission
(
workflow
[
"uuid"
],
{})
workflow_api
.
get_workflow_for_submission
(
workflow
[
"uuid"
],
{})
def
test_preexisting_workflow
(
self
):
"""
Verifies that even if a workflow does not go through start_workflow, it won't blow up.
update_from_assessments() will go through _get_steps(), and add a staff step to the workflow
even if it was created without one initially.
"""
submission
=
sub_api
.
create_submission
({
"student_id"
:
"test student"
,
"course_id"
:
"test course"
,
"item_id"
:
"test item"
,
"item_type"
:
"openassessment"
,
},
"test answer"
)
# Create the model object directly, bypassing start_workflow()
workflow
=
AssessmentWorkflow
.
objects
.
create
(
submission_uuid
=
submission
[
"uuid"
],
status
=
AssessmentWorkflow
.
STATUS
.
waiting
,
course_id
=
"test course"
,
item_id
=
"test item"
)
# This call will throw exceptions if the workflow is in an invalid state
workflow_api
.
update_from_assessments
(
submission
[
"uuid"
],
{})
def
test_get_status_counts
(
self
):
def
test_get_status_counts
(
self
):
# Initially, the counts should all be zero
# Initially, the counts should all be zero
counts
=
workflow_api
.
get_status_counts
(
counts
=
workflow_api
.
get_status_counts
(
...
...
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