Skip to content

Commit ced50cf

Browse files
fix test
1 parent 9257d45 commit ced50cf

File tree

1 file changed

+31
-28
lines changed

1 file changed

+31
-28
lines changed

services/web/server/tests/unit/with_dbs/04/workspaces/test_workspaces__list_projects_full_search.py

Lines changed: 31 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -202,31 +202,34 @@ async def test__list_projects_full_search_with_query_parameters(
202202
assert len(data) == 1
203203
assert data[0]["uuid"] == project["uuid"]
204204

205-
# Full search with tag_ids
206-
base_url = client.app.router["list_projects_full_search"].url_for()
207-
url = base_url.with_query({"text": "Orion", "tag_ids": "1,2"})
208-
resp = await client.get(f"{url}")
209-
data, _ = await assert_status(resp, status.HTTP_200_OK)
210-
assert len(data) == 0
211-
212-
# Create tag
213-
url = client.app.router["create_tag"].url_for()
214-
resp = await client.post(
215-
f"{url}", json={"name": "tag1", "description": "description1", "color": "#f00"}
216-
)
217-
added_tag, _ = await assert_status(resp, status.HTTP_201_CREATED)
218-
219-
# Add tag to study
220-
url = client.app.router["add_project_tag"].url_for(
221-
project_uuid=project["uuid"], tag_id=str(added_tag.get("id"))
222-
)
223-
resp = await client.post(f"{url}")
224-
data, _ = await assert_status(resp, status.HTTP_200_OK)
225-
226-
# Full search with tag_ids
227-
base_url = client.app.router["list_projects_full_search"].url_for()
228-
url = base_url.with_query({"text": "Orion", "tag_ids": f"{added_tag['id']}"})
229-
resp = await client.get(f"{url}")
230-
data, _ = await assert_status(resp, status.HTTP_200_OK)
231-
assert len(data) == 1
232-
assert data[0]["uuid"] == project["uuid"]
205+
# NOTE: MD: To improve the listing project performance https://github.com/ITISFoundation/osparc-simcore/pull/7475
206+
# we are not using the tag_ids in the full search (https://github.com/ITISFoundation/osparc-simcore/issues/7478)
207+
208+
# # Full search with tag_ids
209+
# base_url = client.app.router["list_projects_full_search"].url_for()
210+
# url = base_url.with_query({"text": "Orion", "tag_ids": "1,2"})
211+
# resp = await client.get(f"{url}")
212+
# data, _ = await assert_status(resp, status.HTTP_200_OK)
213+
# assert len(data) == 0
214+
215+
# # Create tag
216+
# url = client.app.router["create_tag"].url_for()
217+
# resp = await client.post(
218+
# f"{url}", json={"name": "tag1", "description": "description1", "color": "#f00"}
219+
# )
220+
# added_tag, _ = await assert_status(resp, status.HTTP_201_CREATED)
221+
222+
# # Add tag to study
223+
# url = client.app.router["add_project_tag"].url_for(
224+
# project_uuid=project["uuid"], tag_id=str(added_tag.get("id"))
225+
# )
226+
# resp = await client.post(f"{url}")
227+
# data, _ = await assert_status(resp, status.HTTP_200_OK)
228+
229+
# # Full search with tag_ids
230+
# base_url = client.app.router["list_projects_full_search"].url_for()
231+
# url = base_url.with_query({"text": "Orion", "tag_ids": f"{added_tag['id']}"})
232+
# resp = await client.get(f"{url}")
233+
# data, _ = await assert_status(resp, status.HTTP_200_OK)
234+
# assert len(data) == 1
235+
# assert data[0]["uuid"] == project["uuid"]

0 commit comments

Comments
 (0)