Commit 9d66f587 authored by parciak's avatar parciak
Browse files

Bugfixes to unit tests.


Signed-off-by: parciak's avatarMarcel Parciak <marcel.parciak@gmail.com>
parent ca47f395
......@@ -183,7 +183,7 @@ def test_complete_workflow(cdstar_archive):
assert test_utils.is_valid_response(json)
assert json["result"]["memory"]["archives"]
assert json["result"]["memory"]["archives"][0] == cdstar_archive
assert json["result"]["memory"]["archives"][0] == [vault_id, archive_id]
# let some time go by for receive to finish
time.sleep(15)
......
......@@ -291,7 +291,7 @@ def test_receive_06(cdstar_archive):
)
meta_json = test_utils.get_json_of_uri(
f"{config.BasicSettings().couch_uri}/{config.BasicSettings().couch_db}/{cdstar_archive}",
f"{config.BasicSettings().couch_uri}/{config.BasicSettings().couch_db}/{cdstar_archive[1]}",
auth=(config.BasicSettings().couch_user, config.BasicSettings().couch_pass),
)
......@@ -327,7 +327,7 @@ def test_receive_07(cdstar_archive):
)
meta_json = test_utils.get_json_of_uri(
f"{config.BasicSettings().couch_uri}/{config.BasicSettings().couch_db}/{cdstar_archive}",
f"{config.BasicSettings().couch_uri}/{config.BasicSettings().couch_db}/{cdstar_archive[1]}",
auth=(config.BasicSettings().couch_user, config.BasicSettings().couch_pass),
)
......@@ -351,7 +351,7 @@ def test_receive_07(cdstar_archive):
assert "abstract" in meta_file_json.keys()
assert (
meta_file_json["abstact"]
meta_file_json["abstract"]
== "This is a dummy file, please do not do any science with it!"
)
......
......@@ -41,7 +41,7 @@ def get_path_for_archive(vault_id: str, archive_id: str) -> str:
def merge_jsonld(jsonld: Dict[str, Any], annotations: Dict[str, Any]) -> Dict[str, Any]:
# Do not allow to override these keys
blacklist = ["@type", "@context", "id"]
for k, v in annotations:
for k, v in annotations.items():
if v is not None and k not in blacklist:
jsonld[k] = v
return jsonld
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment