add forms, shipments tests
Some checks failed
Deploy Amap / deploy (push) Failing after 52s

This commit is contained in:
Julien Aldon
2026-02-27 12:21:50 +01:00
parent 61cbbf0366
commit d28640711c
27 changed files with 606 additions and 138 deletions

View File

@@ -1,21 +1,19 @@
pdferror = 'An error occured during PDF generation please contact administrator'
tokenexipired = 'Token expired'
invalidtoken = 'Invalid token'
notauthenticated = 'Not authenticated'
failtogettoken = 'Failed to get token'
unauthorized = 'Unauthorized'
notallowed = 'Not Allowed'
class Messages:
unauthorized = 'User is Unauthorized'
notauthenticated = 'User is not authenticated'
tokenexipired = 'Token has expired'
invalidtoken = 'Token is invalid'
@staticmethod
def not_found(resource: str) -> str:
return f'{resource.capitalize()} not found'
@staticmethod
def invalid_input(resource: str, reason: str = "") -> str:
return f'Invalid {resource} input {':' if reason else ""} {reason}'
notfound = 'Resource was not found.'
usernotfound = 'User not found'
userloggedout = 'User logged out'
productorinputinvalid = 'Invalid productor input'
productornotfound = 'Productor not found'
forminputinvalid = 'Invalid form input'
formnotfound = 'Form not found'
productinputinvalid = 'Invalid product input'
productnotfound = 'Product not found'
@staticmethod
def not_allowed(resource: str, action: str) -> str:
return f'User is not allowed to {action} this {resource}'