|
35 | 35 | SAVED_PUBMED_PUBLICATION, |
36 | 36 | SAVED_SHORT_EXTRA_LICENSE, |
37 | 37 | TEST_BIORXIV_IDENTIFIER, |
| 38 | + TEST_BRNICH_SCORE_CALIBRATION_CLASS_BASED, |
38 | 39 | TEST_BRNICH_SCORE_CALIBRATION_RANGE_BASED, |
39 | 40 | TEST_CROSSREF_IDENTIFIER, |
40 | 41 | TEST_GNOMAD_DATA_VERSION, |
@@ -234,6 +235,34 @@ def test_create_score_set_with_score_calibration(client, mock_publication_fetch, |
234 | 235 | assert response.status_code == 200 |
235 | 236 |
|
236 | 237 |
|
| 238 | +@pytest.mark.parametrize( |
| 239 | + "mock_publication_fetch", |
| 240 | + [ |
| 241 | + ( |
| 242 | + [ |
| 243 | + {"dbName": "PubMed", "identifier": f"{TEST_PUBMED_IDENTIFIER}"}, |
| 244 | + {"dbName": "bioRxiv", "identifier": f"{TEST_BIORXIV_IDENTIFIER}"}, |
| 245 | + ] |
| 246 | + ) |
| 247 | + ], |
| 248 | + indirect=["mock_publication_fetch"], |
| 249 | +) |
| 250 | +def test_cannot_create_score_set_with_class_based_calibration(client, mock_publication_fetch, setup_router_db): |
| 251 | + experiment = create_experiment(client) |
| 252 | + score_set = deepcopy(TEST_MINIMAL_SEQ_SCORESET) |
| 253 | + score_set["experimentUrn"] = experiment["urn"] |
| 254 | + score_set.update( |
| 255 | + { |
| 256 | + "scoreCalibrations": [deepcamelize(TEST_BRNICH_SCORE_CALIBRATION_CLASS_BASED)], |
| 257 | + } |
| 258 | + ) |
| 259 | + |
| 260 | + response = client.post("/api/v1/score-sets/", json=score_set) |
| 261 | + assert response.status_code == 409 |
| 262 | + response_data = response.json() |
| 263 | + assert "Class-based calibrations are not supported on score set creation" in response_data["detail"] |
| 264 | + |
| 265 | + |
237 | 266 | @pytest.mark.parametrize( |
238 | 267 | "mock_publication_fetch", |
239 | 268 | [ |
|
0 commit comments