add test and fix by lint

This commit is contained in:
moririn2528
2023-08-29 16:58:51 +09:00
parent aed5bf2929
commit 9564731ce9
6 changed files with 80 additions and 21 deletions
+7 -1
View File
@@ -136,7 +136,13 @@ class APITestCase(TestCase):
app,
f"/api/studies/{study_id}/preference",
"POST",
body=json.dumps({"best_trials": [0, 2], "worst_trials": [1]}),
body=json.dumps(
{
"candidate_trials": [0, 1, 2],
"preferentials": [[0, 1], [2, 1]],
"mode": "choose_worst",
}
),
content_type="application/json",
)
self.assertEqual(status, 204)