forked from inspirehep/inspirehep
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
backoffice: use the WorkflowTicket serializer
- Loading branch information
Showing
4 changed files
with
22 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -242,8 +242,9 @@ def test_create_missing_params(self): | |
) | ||
|
||
assert response.status_code == 400 | ||
assert response.data == { | ||
"error": "Workflow_id, ticket_id and ticket_type are required." | ||
assert response.json() == { | ||
"workflow_id": ["This field is required."], | ||
"ticket_id": ["This field is required."], | ||
} | ||
|
||
def test_create_happy_flow(self): | ||
|
@@ -404,25 +405,13 @@ def setUpClass(cls): | |
Workflow.objects.update_or_create( | ||
data={ | ||
"ids": [ | ||
{ | ||
"value": "0000-0003-3302-3333", | ||
"schema": "ORCID" | ||
}, | ||
{ | ||
"value": "CastleFrank", | ||
"schema": "INSPIRE BAI" | ||
} | ||
{"value": "0000-0003-3302-3333", "schema": "ORCID"}, | ||
{"value": "CastleFrank", "schema": "INSPIRE BAI"}, | ||
], | ||
"name": { | ||
"value": "Castle, Frank", | ||
"preferred_name": "Frank Castle" | ||
}, | ||
"name": {"value": "Castle, Frank", "preferred_name": "Frank Castle"}, | ||
"email_addresses": [ | ||
{ | ||
"value": "[email protected]", | ||
"current": True | ||
} | ||
] | ||
{"value": "[email protected]", "current": True} | ||
], | ||
}, | ||
status=StatusChoices.APPROVAL, | ||
core=True, | ||
|
@@ -432,25 +421,13 @@ def setUpClass(cls): | |
Workflow.objects.update_or_create( | ||
data={ | ||
"ids": [ | ||
{ | ||
"value": "0000-0003-3302-2222", | ||
"schema": "ORCID" | ||
}, | ||
{ | ||
"value": "SmithJohn", | ||
"schema": "INSPIRE BAI" | ||
} | ||
{"value": "0000-0003-3302-2222", "schema": "ORCID"}, | ||
{"value": "SmithJohn", "schema": "INSPIRE BAI"}, | ||
], | ||
"name": { | ||
"value": "Smith, John", | ||
"preferred_name": "John Smith" | ||
}, | ||
"name": {"value": "Smith, John", "preferred_name": "John Smith"}, | ||
"email_addresses": [ | ||
{ | ||
"value": "[email protected]", | ||
"current": True | ||
} | ||
] | ||
{"value": "[email protected]", "current": True} | ||
], | ||
}, | ||
status=StatusChoices.RUNNING, | ||
core=True, | ||
|