mirror of
https://github.com/ProtoThis/python-synology.git
synced 2025-08-15 02:47:03 +00:00

* Replace setup files with pyproject.toml Now we can use poetry to manage the package. poetry install to install the package in a venv poetry run ... to launch pylint, pytest or black * Add CI with GitHub Action Add a tests and release workflow Add release drafter Add dependabot * Remove old CI based on travis and pylint * Add linting configuration files Linting mainly based on flake8 and plugins. Add specific files for darglint and mypy. * Update .gitignore * Add test suite with nox and pre-commit Test suite inculde pre-commit, safety, mypy, tests, typguard and documentation checks. * Add .gitattributes * Update code coverage target to 80% * Code style update by Black * Update poetry lock file * Deactivate temporarly some linting tests * Add a contributing guide * Remove Python 3.6 in GitHub Action * Patch noxfile.py to be able to test mypy session * Rebase version to 1.0.0
32 lines
1.5 KiB
Python
32 lines
1.5 KiB
Python
"""Test constants."""
|
|
# API test data are localized in
|
|
# `tests/api_data/dsm_[dsm_major_version]`
|
|
# Data constant names should be like :
|
|
# "DSM_[dsm_version]_[API_KEY]"
|
|
# if data failed, add "_FAILED"
|
|
|
|
SESSION_ID = "session_id"
|
|
SYNO_TOKEN = "Syñ0_T0k€ñ"
|
|
DEVICE_TOKEN = "Dév!cè_T0k€ñ"
|
|
UNIQUE_KEY = "1x2X3x!_UK"
|
|
|
|
# Common API error code
|
|
ERROR_UNKNOWN = {"error": {"code": 100}, "success": False}
|
|
ERROR_INVALID_PARAMETERS = {"error": {"code": 101}, "success": False}
|
|
ERROR_API_NOT_EXISTS = {"error": {"code": 102}, "success": False}
|
|
ERROR_API_METHOD_NOT_EXISTS = {"error": {"code": 103}, "success": False}
|
|
ERROR_API_VERSION_NOT_SUPPORTED = {"error": {"code": 104}, "success": False}
|
|
ERROR_INSUFFICIENT_USER_PRIVILEGE = {"error": {"code": 105}, "success": False}
|
|
ERROR_CONNECTION_TIME_OUT = {"error": {"code": 106}, "success": False}
|
|
ERROR_MULTIPLE_LOGIN_DETECTED = {"error": {"code": 107}, "success": False}
|
|
|
|
# Auth API error code
|
|
ERROR_AUTH_INVALID_CREDENTIALS = {"error": {"code": 400}, "success": False}
|
|
ERROR_AUTH_GUEST_OR_DISABLED_ACCOUNT = {"error": {"code": 401}, "success": False}
|
|
ERROR_AUTH_PERMISSION_DENIED = {"error": {"code": 402}, "success": False}
|
|
ERROR_AUTH_OTP_NOT_SPECIFIED = {"error": {"code": 403}, "success": False}
|
|
ERROR_AUTH_OTP_AUTHENTICATE_FAILED = {"error": {"code": 404}, "success": False}
|
|
ERROR_AUTH_INCORRECT_APP_PORTAL = {"error": {"code": 405}, "success": False}
|
|
ERROR_AUTH_OTP_CODE_ENFORCED = {"error": {"code": 406}, "success": False}
|
|
ERROR_AUTH_MAX_TRIES = {"error": {"code": 407}, "success": False}
|