-
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.
- Loading branch information
Ronald Krist
committed
Mar 14, 2024
1 parent
1b43724
commit e8bef80
Showing
12 changed files
with
179 additions
and
124 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
from oarepo_requests.resources.record.config import RecordRequestsResourceConfig | ||
|
||
|
||
|
||
class DraftRecordRequestsResourceConfig(RecordRequestsResourceConfig): | ||
"""""" | ||
|
||
routes = { | ||
**RecordRequestsResourceConfig.routes, | ||
"list-drafts": "/<pid_value>/draft/requests", | ||
"type-draft": "/<pid_value>/draft/requests/<request_type>" | ||
} |
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
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
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
|
||
def test_record( | ||
logged_client_post, | ||
record_factory, | ||
identity_simple, | ||
users, | ||
urls, | ||
delete_record_data_function, | ||
search_clear, | ||
): | ||
creator = users[0] | ||
receiver = users[1] | ||
record1 = record_factory() | ||
|
||
ThesisRecord.index.refresh() | ||
|
||
|
||
|
||
def test_draft( | ||
logged_client_post, | ||
identity_simple, | ||
users, | ||
urls, | ||
publish_request_data_function, | ||
search_clear, | ||
): | ||
creator = users[0] | ||
receiver = users[1] | ||
|
||
draft1 = logged_client_post(creator, "post", urls["BASE_URL"], json={}) | ||
draft_id = draft1.json["id"] | ||
|
||
resp_request_create = logged_client_post( | ||
creator, | ||
"post", | ||
f"{urls['BASE_URL']}{draft_id}/draft/requests/thesis_draft_publish_draft", | ||
json={"receiver":{"user": receiver.id}}, | ||
) | ||
assert resp_request_create.status_code == 201 | ||
assert resp_request_create.json.request_types | ||
print() | ||
|
Oops, something went wrong.