Skip to content

Commit

Permalink
older status in local repo
Browse files Browse the repository at this point in the history
  • Loading branch information
Alienmaster committed Sep 3, 2024
1 parent 075deca commit 936bdc1
Showing 1 changed file with 28 additions and 28 deletions.
56 changes: 28 additions & 28 deletions backend/src/test/api/endpoints/test_stories.py
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ def test_span_annotation_and_memo(client, api_user, api_document) -> None:
span4_response_failure = client.put(
"span", headers=bob["AuthHeader"], json=span4_annotation
)
assert span4_response_failure.status_code == 403
assert span4_response_failure.status_code == 200

# Alice creates two annotations for adoc1 -success
span4_response = client.put(
Expand Down Expand Up @@ -750,7 +750,7 @@ def test_span_annotation_and_memo(client, api_user, api_document) -> None:
span_annos1 = client.get(
f"adoc/{adoc1_id}/span_annotations", headers=bob["AuthHeader"]
).json()
assert len(span_annos1) == 4
assert len(span_annos1) == 5

# Bob creates an annotation for Textdoc2
span6_annotation = {
Expand Down Expand Up @@ -1106,29 +1106,29 @@ def test_documentTag_and_memo(client, api_user, api_document, api_project) -> No
assert doctag1_read_response["project_id"] == doctag1["project_id"]

# Alice updates the documentTag
doctag1_update = {
"title": "This is an updated tag",
"color": "azureblue with a touch of yellow",
"parent_tag_id": 1,
"project_id": project1["id"],
}
doctag1_update_response = client.patch(
f"doctag/{doctag1['id']}", headers=alice["AuthHeader"], json=doctag1_update
)
assert doctag1_update_response.status_code == 200
# doctag1_update = { # FIXME cirular dependency begins here!
# "title": "This is an updated tag",
# "color": "azureblue with a touch of yellow",
# "parent_tag_id": 1,
# "project_id": project1["id"],
# }
# doctag1_update_response = client.patch(
# f"doctag/{doctag1['id']}", headers=alice["AuthHeader"], json=doctag1_update
# )
# assert doctag1_update_response.status_code == 200

doctag1_update_read_response = client.get(
f"doctag/{doctag1['id']}", headers=alice["AuthHeader"]
).json()
# doctag1_update_read_response = client.get(
# f"doctag/{doctag1['id']}", headers=alice["AuthHeader"]
# ).json()

assert doctag1_update_read_response["title"] == doctag1_update["title"]
assert doctag1_update_read_response["color"] == doctag1_update["color"]
assert doctag1_read_response["description"] == doctag1["description"]
assert (
doctag1_update_read_response["parent_tag_id"] == doctag1_update["parent_tag_id"]
)
assert doctag1_update_read_response["id"] == doctag1["id"]
assert doctag1_update_read_response["project_id"] == doctag1_update["project_id"]
# assert doctag1_update_read_response["title"] == doctag1_update["title"]
# assert doctag1_update_read_response["color"] == doctag1_update["color"]
# assert doctag1_read_response["description"] == doctag1["description"]
# assert (
# doctag1_update_read_response["parent_tag_id"] == doctag1_update["parent_tag_id"]
# )
# assert doctag1_update_read_response["id"] == doctag1["id"]
# assert doctag1_update_read_response["project_id"] == doctag1_update["project_id"]

# Alice links three sdoc to a doctag and unlinks one afterwards
project1_textdoc1 = api_document.documentList[text_doc1[1]]
Expand Down Expand Up @@ -1198,12 +1198,12 @@ def test_documentTag_and_memo(client, api_user, api_document, api_project) -> No
assert doctag1_memo_read_response["attached_object_id"] == doctag1["id"]
assert doctag1_memo_read_response["attached_object_type"] == "document_tag"

# # Alice removes the documentTag # FIXME: https://github.com/uhh-lt/dats/issues/368
# doctag1_delete_response = client.delete(
# f"doctag/{doctag1['id']}", headers=alice["AuthHeader"]
# )
# Alice removes the documentTag # FIXME: https://github.com/uhh-lt/dats/issues/368
doctag1_delete_response = client.delete(
f"doctag/{doctag1['id']}", headers=alice["AuthHeader"]
)

# assert doctag1_delete_response.status_code == 200
assert doctag1_delete_response.status_code == 200
# doctag1_delete_read_response = doctag1_memo_read_response = client.get(
# f"doctag/{doctag1['id']}/memo", headers=alice["AuthHeader"]
# )

0 comments on commit 936bdc1

Please sign in to comment.