Skip to content

Commit

Permalink
Fix graph tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ml-evs committed Jul 7, 2023
1 parent eab1cb1 commit ec2fb05
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pydatalab/pydatalab/routes/v0_1/graphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def get_graph_cy_format(item_id: Optional[str] = None):
node_collections.add(relationship["immutable_id"])
continue

if relationship.get("relation") != "parent":
if relationship.get("relation") not in ("parent", "is_part_of"):
continue

target = document["item_id"]
Expand Down
15 changes: 8 additions & 7 deletions pydatalab/tests/routers/test_samples.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,7 @@ def test_create_cell(client, default_cell):
assert response.status_code == 201, response.json
assert response.json["status"] == "success"


@pytest.mark.dependency(depends=["test_create_cell"])
def test_create_collections(client, default_collection):

Expand Down Expand Up @@ -418,13 +419,13 @@ def test_create_collections(client, default_collection):

data = json.loads(new_collection.json())
data.update(
{
"starting_members": [
{"item_id": "copy_of_complicated_cell"},
{"item_id": "test_cell"},
]
}
)
{
"starting_members": [
{"item_id": "copy_of_complicated_cell"},
{"item_id": "test_cell"},
]
}
)
response = client.put("/collections/", json={"data": data})
assert response.status_code == 201, response.json
assert response.json["status"] == "success"
Expand Down

0 comments on commit ec2fb05

Please sign in to comment.