Skip to content

Commit

Permalink
Add some more checks in meta-analysis tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
EstelleDa committed Dec 13, 2024
1 parent c4dbfa2 commit 039da08
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/routers/test_score_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -1071,6 +1071,7 @@ def test_publish_single_score_set_meta_analysis(session, data_provider, client,
)

meta_score_set = (client.post(f"/api/v1/score-sets/{meta_score_set['urn']}/publish")).json()
assert isinstance(MAVEDB_SCORE_SET_URN_RE.fullmatch(meta_score_set["urn"]), re.Match)
assert meta_score_set["urn"] == "urn:mavedb:00000001-0-1"


Expand Down Expand Up @@ -1101,6 +1102,7 @@ def test_multiple_score_set_meta_analysis_single_experiment(
assert score_set_1_refresh["metaAnalyzedByScoreSetUrns"] == [meta_score_set["urn"]]

meta_score_set = (client.post(f"/api/v1/score-sets/{meta_score_set['urn']}/publish")).json()
assert isinstance(MAVEDB_SCORE_SET_URN_RE.fullmatch(meta_score_set["urn"]), re.Match)
assert meta_score_set["urn"] == "urn:mavedb:00000001-0-1"


Expand Down Expand Up @@ -1132,6 +1134,7 @@ def test_multiple_score_set_meta_analysis_multiple_experiment_sets(
assert score_set_1_refresh["metaAnalyzedByScoreSetUrns"] == [meta_score_set["urn"]]

meta_score_set = (client.post(f"/api/v1/score-sets/{meta_score_set['urn']}/publish")).json()
assert isinstance(MAVEDB_SCORE_SET_URN_RE.fullmatch(meta_score_set["urn"]), re.Match)
assert meta_score_set["urn"] == "urn:mavedb:00000003-0-1"


Expand Down Expand Up @@ -1165,6 +1168,7 @@ def test_multiple_score_set_meta_analysis_multiple_experiments(
assert score_set_1_refresh["metaAnalyzedByScoreSetUrns"] == [meta_score_set["urn"]]

meta_score_set = (client.post(f"/api/v1/score-sets/{meta_score_set['urn']}/publish")).json()
assert isinstance(MAVEDB_SCORE_SET_URN_RE.fullmatch(meta_score_set["urn"]), re.Match)
assert meta_score_set["urn"] == "urn:mavedb:00000001-0-1"


Expand Down Expand Up @@ -1254,6 +1258,9 @@ def test_multiple_score_set_meta_analysis_multiple_experiment_sets_different_sco
assert meta_score_set_2["urn"] == "urn:mavedb:00000003-0-2"
meta_score_set_3 = (client.post(f"/api/v1/score-sets/{meta_score_set_3['urn']}/publish")).json()
assert meta_score_set_3["urn"] == "urn:mavedb:00000003-0-3"
assert isinstance(MAVEDB_SCORE_SET_URN_RE.fullmatch(meta_score_set_1["urn"]), re.Match)
assert isinstance(MAVEDB_SCORE_SET_URN_RE.fullmatch(meta_score_set_2["urn"]), re.Match)
assert isinstance(MAVEDB_SCORE_SET_URN_RE.fullmatch(meta_score_set_3["urn"]), re.Match)


def test_cannot_add_score_set_to_meta_analysis_experiment(session, data_provider, client, setup_router_db, data_files):
Expand Down Expand Up @@ -1336,6 +1343,7 @@ def test_multiple_score_set_meta_analysis_single_experiment_with_different_creat

meta_score_set = (client.post(f"/api/v1/score-sets/{meta_score_set['urn']}/publish")).json()
assert meta_score_set["urn"] == "urn:mavedb:00000001-0-1"
assert isinstance(MAVEDB_SCORE_SET_URN_RE.fullmatch(meta_score_set["urn"]), re.Match)


def test_multiple_score_set_meta_analysis_multiple_experiment_sets_with_different_creator(
Expand Down Expand Up @@ -1368,6 +1376,7 @@ def test_multiple_score_set_meta_analysis_multiple_experiment_sets_with_differen

meta_score_set = (client.post(f"/api/v1/score-sets/{meta_score_set['urn']}/publish")).json()
assert meta_score_set["urn"] == "urn:mavedb:00000003-0-1"
assert isinstance(MAVEDB_SCORE_SET_URN_RE.fullmatch(meta_score_set["urn"]), re.Match)

########################################################################################################################
# Score set search
Expand Down

0 comments on commit 039da08

Please sign in to comment.