From 523aa08a603c77bdc9ef2396ec0b62d5c6a25a96 Mon Sep 17 00:00:00 2001 From: Luigi Pellecchia Date: Sat, 7 Dec 2024 18:13:39 +0100 Subject: [PATCH] Test Case conflict should take into account also the title as in the same file we can 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..5a994a8 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 == title).filter( TestCaseModel.repository == repository).filter( TestCaseModel.relative_path == relative_path).all()) > 0: return "Test Case already associated to the current api.", 409