Open k-allagbe opened 1 month ago
I suggest we also invest a bit of time to use the InspectionDB model in necessary tests
I also suggest in this issue we rework the tests to keep the object tests structure. Currently we have tests for each of our objects but we also have a update folder (and now a delete folder?) which tests each objects for their respective operation. We should keep all the tests for the same object into the object query tests file.
I also suggest in this issue we rework the tests to keep the object tests structure. Currently we have tests for each of our objects but we also have a update folder (and now a delete folder?) which tests each objects for their respective operation. We should keep all the tests for the same object into the object query tests file.
Updated.
Description:
In some test cases, SQL queries are written directly within the tests, even though there are existing Python functions and Pydantic models that could be used instead. This makes the tests harder to maintain and introduces redundancy. The goal is to replace all direct SQL queries in the test cases with calls to the appropriate existing Python functions and Pydantic models, ensuring the tests are easier to maintain, consistent, and align with the project structure.
Additionally, the folder structure for the tests has deviated from the original, making it harder to navigate. The folder structure should be reworked to match the original project structure for better maintainability.
Acceptance Criteria: