From 2f3766fabf6d281b5edfc919d5c813ccda345ed3 Mon Sep 17 00:00:00 2001 From: Luigi Pellecchia Date: Sat, 7 Dec 2024 18:03:58 +0100 Subject: [PATCH] TestCase conflict should take into account also the test case title because the same file into a repo can be use to implement multiple test cases. Signed-off-by: Luigi Pellecchia --- api/api.py | 1 + 1 file changed, 1 insertion(+) diff --git a/api/api.py b/api/api.py index 9426b22..7e8263b 100644 --- a/api/api.py +++ b/api/api.py @@ -2245,6 +2245,7 @@ def post(self): # Check if the same Test Case is already associated with the same snippet if len(dbi.session.query(ApiTestCaseModel).join(TestCaseModel).filter( ApiTestCaseModel.section == section).filter( + TestCaseModel.title == repository).filter( TestCaseModel.repository == repository).filter( TestCaseModel.relative_path == relative_path).all()) > 0: return "Test Case already associated to the current api.", 409