Skip to content

Commit

Permalink
TestCase conflict should take into account also the test case title b…
Browse files Browse the repository at this point in the history
…ecause the same file into a repo can be use to implement multiple test cases.

Signed-off-by: Luigi Pellecchia <[email protected]>
  • Loading branch information
Luigi Pellecchia committed Dec 7, 2024
1 parent 7b30888 commit 9232571
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9232571

Please sign in to comment.