-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update '_access.update' to include existing values
- Loading branch information
1 parent
0b25957
commit 90a8237
Showing
2 changed files
with
10 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,6 +85,9 @@ def assert_bucket_for_video(bucket_id, video): | |
video_schema = ( | ||
"https://cds.cern.ch/schemas/" "deposits/records/videos/video/video-v1.0.0.json" | ||
) | ||
|
||
project_deposit_metadata.setdefault("_access", {}).setdefault("update", []) | ||
project_deposit_metadata["_access"]["update"].append("[email protected]") | ||
|
||
with api_app.test_client() as client: | ||
login_user(User.query.get(users[0])) | ||
|
@@ -100,6 +103,8 @@ def assert_bucket_for_video(bucket_id, video): | |
assert res.status_code == 201 | ||
project_dict = json.loads(res.data.decode("utf-8")) | ||
assert project_dict["metadata"]["videos"] == [] | ||
assert User.query.get(users[0]).email in project_dict["metadata"]["_access"]["update"] | ||
assert "[email protected]" in project_dict["metadata"]["_access"]["update"] | ||
assert project_dict["metadata"]["title"]["title"] == "my project" | ||
assert project_dict["links"]["bucket"].startswith("http://localhost/files/") | ||
assert all( | ||
|