Terarea  2
The automation project
Loading...
Searching...
No Matches
constants.py File Reference

Go to the source code of this file.

Namespaces

namespace  constants
 

Functions

str constants.get_cache_busting ()
 
Any constants._get_env_node (Dict[str, Any] env, str key, str default)
 
str constants._get_environement_variable (dotenv environement, str variable_name)
 
str constants._get_toml_variable (dict toml_conf, str section, str key, default=None)
 
str constants._password_generator (int length=20, str encapsulation_node="password")
 
bool constants.are_json_responses_identical (Dict[str, Any] json_response1, Dict[str, Any] json_response2, str test_name="are_json_responses_identical")
 

Variables

bool constants.DEBUG = False
 
 constants.debug
 
 constants.name
 
int constants.DB_PORT = 3307
 
str constants.DB_HOST = "127.0.0.1"
 
str constants.DB_USER = "root"
 
str constants.DB_PASSWORD = ""
 
str constants.DB_DATABASE = "terarea"
 
str constants.SERVER_HOST = "0.0.0.0"
 
str constants.QUERY_HOST = "http://127.0.0.1"
 
int constants.PORT = 6000
 
int constants.QUERY_DELAY = 2
 
int constants.SUCCESS = 0
 
int constants.ERROR = 1
 
str constants.APP_NAME = "Area - Testing"
 
 constants.SAFE_STRING = ascii_letters+digits
 
 constants.SAFE_STRING_LENGTH = len(SAFE_STRING)
 
str constants.CACHE_BUSTER = get_cache_busting()
 
str constants.CACHE_BUSTER_ADMIN = f"admin_{get_cache_busting()}_admin"
 
str constants.TEST_ENV = ".env"
 
 constants.ENV = dict(dotenv.dotenv_values())
 
Any constants.MINIO_HOST = _get_env_node(ENV, "MINIO_HOST", "minio")
 
 constants.MINIO_PORT = int(_get_env_node(ENV, "MINIO_PORT", 9000))
 
Any constants.MINIO_ROOT_USER = _get_env_node(ENV, "MINIO_ROOT_USER", "root")
 
str constants.MINIO_ROOT_PASSWORD
 
 constants.TOML_CONF = toml.load("config.toml")
 
str constants.PATH_GET_HOME = "/"
 
str constants.PATH_GET_API_HOME = "/api/v1/"
 
str constants.PATH_PUT_REGISTER = "/api/v1/register"
 
str constants.PATH_POST_LOGIN = "/api/v1/login"
 
str constants.PATH_PATCH_USER = "/api/v1/user"
 
str constants.PATH_PUT_USER = "/api/v1/user"
 
str constants.PATH_DELETE_USER = "/api/v1/user"
 
str constants.PATH_GET_USER = "/api/v1/user"
 
str constants.PATH_GET_USER_ID = "/api/v1/user_id"
 
str constants.PATH_POST_LOGOUT = "/api/v1/logout"
 
str constants.LAMBDA_USER_TOKEN_KEY = "lambda_user"
 
str constants.ADMIN_USER_TOKEN_KEY = "admin_user"
 
str constants.TOKEN_AUTH_ID_STR = "Authorization"
 
str constants.PRETTY_TOKEN_KEY = "token_header"
 
str constants.RAW_TOKEN_KEY = "token_key"
 
str constants.USER_DATA_EMAIL = f"some_email_{CACHE_BUSTER}@company.example"
 
str constants.USER_DATA_USERNAME = USER_DATA_EMAIL.split("@")[0]
 
str constants.USER_DATA_PASSWORD
 
str constants.USER_DATA_METHOD = "local"
 
str constants.USER_DATA_FAVICON = "NULL"
 
str constants.USER_DATA_ADMIN = "0"
 
str constants.USER_DATA_TOKEN = f"some_token_{CACHE_BUSTER}_some_token"
 
int constants.USER_DATA_TOKEN_LIFESPAN = 3600
 
str constants.USER_DATA_EMAIL_REBIND = f"some_email_{CACHE_BUSTER}_rebind@company.example"
 
str constants.USER_DATA_USERNAME_REBIND = USER_DATA_EMAIL_REBIND.split("@")[0]
 
str constants.USER_DATA_PASSWORD_REBIND
 
str constants.USER_DATA_EMAIL_PATCH = f"some_email_{CACHE_BUSTER}_patch@company.com"
 
str constants.USER_DATA_USERNAME_PATCH = USER_DATA_EMAIL_PATCH.split("@")[0]
 
str constants.USER_DATA_PASSWORD_PATCH
 
str constants.ADMIN_DATA_EMAIL = f"some_email_{CACHE_BUSTER_ADMIN}@company.example"
 
str constants.ADMIN_DATA_USERNAME = ADMIN_DATA_EMAIL.split("@")[0]
 
str constants.ADMIN_DATA_PASSWORD
 
str constants.ADMIN_DATA_METHOD = "local"
 
str constants.ADMIN_DATA_FAVICON = "NULL"
 
str constants.ADMIN_DATA_ADMIN = "1"
 
str constants.ADMIN_DATA_TOKEN = f"some_token_{CACHE_BUSTER_ADMIN}_some_token"
 
int constants.ADMIN_DATA_TOKEN_LIFESPAN = 3600
 
str constants.ADMIN_DATA_EMAIL_REBIND = f"some_email_{CACHE_BUSTER_ADMIN}_"
 
str constants.ADMIN_DATA_USERNAME_REBIND = ADMIN_DATA_EMAIL_REBIND.split("@")[0]
 
str constants.ADMIN_DATA_PASSWORD_REBIND
 
str constants.ADMIN_DATA_EMAIL_PATCH = f"some_email_{CACHE_BUSTER_ADMIN}_patch@company.com"
 
str constants.ADMIN_DATA_USERNAME_PATCH = ADMIN_DATA_EMAIL_PATCH.split("@")[0]
 
str constants.ADMIN_DATA_PASSWORD_PATCH
 
str constants.UNODE_EMAIL_KEY = "email"
 
str constants.UNODE_PASSWORD_KEY = "password"
 
str constants.UNODE_USERNAME_KEY = "username"
 
str constants.UNODE_METHOD_KEY = "method"
 
str constants.UNODE_FAVICON_KEY = "favicon"
 
str constants.UNODE_ADMIN_KEY = "admin"
 
str constants.USER_NORMAL_MODE = "normal"
 
str constants.USER_PUT_MODE = "put"
 
str constants.USER_PATCH_MODE = "patch"
 
str constants.RUNTIME_NODE_CRITICAL_KEY = "critical"
 
dict constants.RESPONSE_GET_HOME_RESPONSE_NOT_LOGGED_IN
 
dict constants.RESPONSE_GET_HOME_API_RESPONSE_NOT_LOGGED_IN
 
dict constants.RESPONSE_POST_LOGIN
 
dict constants.RESPONSE_POST_REGISTER
 
dict constants.RESPONSE_PUT_USER
 
dict constants.RESPONSE_PATCH_USER
 
dict constants.RESPONSE_GET_USER
 
dict constants.RESPONSE_GET_USER_ID
 
dict constants.RESPONSE_POST_LOGOUT
 
dict constants.RESPONSE_DELETE_USER