Commit Graph

493 Commits

Author SHA1 Message Date
Max Metz
f57b317a27 centralizing SQL queries into a single object, SQLQuery, which provides quick access to build the queries. Created unit tests to make sure the object works as expected. SQLQuery object is not yet in active use, but only suggested with commented-code. Not fully finished yet. 203 unit tests, all passing. 2024-05-28 18:45:15 +02:00
Max Metz
277e28c518 added InputValidationTimes for POST, PUT and DELETE requests. Created unit tests to check the individual functions. The input validation has been activated in BreCal.api.times. There is now a total of 188 unit tests, all passing. Created some utility functions and stub objects to ease the unit testing. 2024-05-28 14:18:59 +02:00
Max Metz
4aecb66408 began creating pseudo code for InputValidationTimes for POST, PUT and DELETE requests. 2024-05-27 18:51:51 +02:00
Max Metz
4c1b230de9 implemented InputValidationShip and activated it for POST, PUT and DELETE requests. Created 10 unit tests to check for the functionality. Refactored some functions to avoid circular importing. 2024-05-27 18:23:07 +02:00
Max Metz
be58c44a2f Merge branch 'feature/auth_validation' of github.com:puls200/brecal into feature/auth_validation 2024-05-27 15:44:27 +02:00
Max Metz
95c771b7d1 implemented PUT-request validation. It validates the user's authority, as well as the respective PUT data. Both, POST-request and PUT-request, of shipcalls are now input-validated. 2024-05-27 15:33:33 +02:00
Max Metz
7c8cd3763a added an optional argument 'instance_path' to the create_app function. This does not change the current behaviour, but allows for easier local testing and development. Added roughly 40 unit tests to verify the input validation of shipcalls (mostly for POST requests). Updated pytests to support the 'ignore_terminal_flag', which was enabled in version 1.2. The flag is tested to ensure proper behaviour. Included most of the shipcall input validation rules for POST and PUT requests 2024-05-27 15:33:33 +02:00
Max Metz
98b8845015 extending the capabilities of InputValidationShipcall and performing unit tests to check proper implementation. 2024-05-27 15:33:33 +02:00
Max Metz
ea5aa132d2 refactoring 'validate_post_shipcall_data' into a novel object InputValidationShipcall. Implemented the majority of rules for POST and PUT requests. Unit tests have not been created & run yet 2024-05-27 15:33:32 +02:00
Max Metz
e465ff0c59 implementing more input-validation-functions for shipcalls and ships. Beginning to refactor some of the validation functions into more readable Python classes. 2024-05-27 15:33:32 +02:00
Max Metz
b38cec3a37 implementing POST-request input validation for shipcalls. Creating many tests and applying slight updates to the Notifier (not implemented yet) 2024-05-27 15:33:29 +02:00
Max Metz
e85c994692 setting up a local mysql database and running the API locally, which requires slight adaptations. Implementing input validation for POST requests of shipcalls and adapting enumerators, as well as data models. 2024-05-27 15:29:46 +02:00
scopesorting
a38dada3de removing workspace file from VSCode 2024-05-27 15:23:38 +02:00
scopesorting
2dcd74f5e5 updating STUB objects, slightly adapting data models 2024-05-27 15:23:33 +02:00
scopesorting
3633993ca6 implementing notifications, working on input validation 2024-05-27 15:20:42 +02:00
scopesorting
6890f0126b partial commit of integrating the input validation (references and mandatory fields) 2024-05-27 15:10:36 +02:00
scopesorting
16c8bebfe0 adapting shipcall, times and user to include ValidationError (marshmallow). Adjusting the Schemas for User, Times and Shipcall to be validated with additional input validators. Creating a set of tests for the input validations. 2024-05-27 15:09:29 +02:00
scopesorting
6aaaa32445 slight adjustments to prepare the authentification validation 2024-05-27 15:01:44 +02:00
Max Metz
199b4339fa refactored the shipcall's GET mysql-query into a separate file and reused it in the evaluation routine. 2024-05-27 15:00:29 +02:00
Max Metz
20f139ebd9 refactoring SQL get-query for shipcall into a separate utility-section, so it becomes reusable 2024-05-27 15:00:29 +02:00
Max Metz
c1f91a3ef8 implementing more input-validation-functions for shipcalls and ships. Beginning to refactor some of the validation functions into more readable Python classes. 2024-05-27 15:00:29 +02:00
Max Metz
d81e0e2ecc implementing POST-request input validation for shipcalls. Creating many tests and applying slight updates to the Notifier (not implemented yet) 2024-05-27 15:00:29 +02:00
Max Metz
5e9d6af416 adapting rule 0005A and refactoring header-checks. Solving a conflict between versions, where there was a premature exit for time-agreement-rules. 2024-05-27 15:00:28 +02:00
Max Metz
7c39ec1031 setting up a local mysql database and running the API locally, which requires slight adaptations. Implementing input validation for POST requests of shipcalls and adapting enumerators, as well as data models. 2024-05-27 15:00:28 +02:00
scopesorting
cdd305fd05 removing workspace file from VSCode 2024-05-27 15:00:28 +02:00
scopesorting
fc19beb313 updating STUB objects, slightly adapting data models 2024-05-27 15:00:28 +02:00
scopesorting
5953bb8a40 git ignoring VSCode 2024-05-27 15:00:28 +02:00
scopesorting
d810256596 enumerators are now IntEnum objects, which provides simpler typing. 2024-05-27 15:00:28 +02:00
scopesorting
863d265669 implementing notifications, working on input validation. rebase. 2024-05-27 15:00:28 +02:00
scopesorting
1cc47d1eaf implementing an EmailHandler to send out emails (potentially with attachment). 2024-05-27 15:00:28 +02:00
scopesorting
29de011229 partial commit of integrating the input validation (references and mandatory fields) 2024-05-27 15:00:28 +02:00
scopesorting
3f08c342c7 adapting shipcall, times and user to include ValidationError (marshmallow). Adjusting the Schemas for User, Times and Shipcall to be validated with additional input validators. Creating a set of tests for the input validations. 2024-05-27 15:00:28 +02:00
scopesorting
39fbe67938 slight adjustments to prepare the authentification validation 2024-05-27 15:00:28 +02:00
50e9261267 avoid thread termination by catching exception thrown on failed times GET 2024-05-15 09:48:45 +02:00
97d4fa9faf Bugfix for update deadlock and increased version to 1.2.1.1 2024-05-15 09:48:22 +02:00
Max Metz
07c735a3f3 extending the capabilities of InputValidationShipcall and performing unit tests to check proper implementation. 2024-05-15 00:31:14 +02:00
Max Metz
79e22d86f2 refactoring 'validate_post_shipcall_data' into a novel object InputValidationShipcall. Implemented the majority of rules for POST and PUT requests. Unit tests have not been created & run yet 2024-05-14 15:42:20 +02:00
Max Metz
32c8797da5 indentation issues resolved. 2024-05-14 12:48:19 +02:00
Max Metz
6966ba65e3 refactored the shipcall's GET mysql-query into a separate file and reused it in the evaluation routine. 2024-05-14 12:44:54 +02:00
Max Metz
2671bbbd05 refactoring SQL get-query for shipcall into a separate utility-section, so it becomes reusable 2024-05-14 12:36:54 +02:00
Max Metz
ba031e6d14 implementing more input-validation-functions for shipcalls and ships. Beginning to refactor some of the validation functions into more readable Python classes. 2024-05-14 12:36:54 +02:00
Max Metz
b7078f8d8e implementing POST-request input validation for shipcalls. Creating many tests and applying slight updates to the Notifier (not implemented yet) 2024-05-14 12:36:54 +02:00
Max Metz
d0753f0b32 adapting rule 0005A and refactoring header-checks. Solving a conflict between versions, where there was a premature exit for time-agreement-rules. 2024-05-14 12:36:14 +02:00
Max Metz
b32b466f74 setting up a local mysql database and running the API locally, which requires slight adaptations. Implementing input validation for POST requests of shipcalls and adapting enumerators, as well as data models. 2024-05-14 12:25:37 +02:00
scopesorting
fcb889d2bc removing workspace file from VSCode 2024-05-14 12:25:37 +02:00
scopesorting
90aefaeb99 updating STUB objects, slightly adapting data models 2024-05-14 12:25:37 +02:00
scopesorting
2ce96a4fd6 git ignoring VSCode 2024-05-14 12:25:37 +02:00
scopesorting
f684b2fd95 enumerators are now IntEnum objects, which provides simpler typing. 2024-05-14 12:25:37 +02:00
scopesorting
73d13d4d62 implementing notifications, working on input validation. rebase. 2024-05-14 12:25:22 +02:00
scopesorting
f3818a1b2f implementing an EmailHandler to send out emails (potentially with attachment). 2024-05-14 12:19:32 +02:00