Skip to content

Commit

Permalink
Test Case conflict should take into account also the title as in the …
Browse files Browse the repository at this point in the history
…same file we can implement multiple test cases.

Signed-off-by: Luigi Pellecchia <[email protected]>
  • Loading branch information
Luigi Pellecchia committed Dec 7, 2024
1 parent 6eed1b9 commit 523aa08
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 == title).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 523aa08

Please sign in to comment.