added tests

This commit is contained in:
2025-10-18 16:20:36 -04:00
parent 05c89e5c61
commit 4e2527f75b
3 changed files with 207 additions and 4 deletions

View File

@@ -10,10 +10,17 @@ import psycopg
import asyncio
ENV = dotenv_values(".env") # .env file
VERSION = "v0.0.1" # version number
VERSION = "v1.0.0" # version number
ALPHABET = string.ascii_uppercase + string.digits #alphabet and numbers for token generation
LICENSE_KEY_PARTS = 5 if "NUM_KEY_CHUNKS" not in ENV else ENV["NUM_KEY_CHUNKS"] #number of chunks in the new generated license keys
LICENSE_KEY_PART_LENGTH = 5 if "KEY_CHUNK_LENGTH" not in ENV else ENV["KEY_CHUNK_LENGTH"] #number of characters in each chunk
try:
LICENSE_KEY_PARTS = 5 if "NUM_KEY_CHUNKS" not in ENV else int(ENV["NUM_KEY_CHUNKS"]) #number of chunks in the new generated license keys
except:
LICENSE_KEY_PARTS = 5
try:
LICENSE_KEY_PART_LENGTH = 5 if "KEY_CHUNK_LENGTH" not in ENV else int(ENV["KEY_CHUNK_LENGTH"]) #number of characters in each chunk
except:
LICENSE_KEY_PART_LENGTH = 5
api_key = ""
security = HTTPBearer(auto_error=False)