reorg config and tests

This commit is contained in:
philip306 2020-07-30 09:40:21 -04:00
parent b0c3eadf77
commit cd2327aef7
4 changed files with 1 additions and 12 deletions

View File

@ -1,11 +0,0 @@
from pydantic import BaseSettings
class Settings(BaseSettings):
app_name: str = "CountAPI"
ttlsetting: int = 100000
redishost: str = '192.168.25.12'
port: int = 6379
db: int = 0
redispass: str = ""
settings = Settings()

View File

@ -2,7 +2,7 @@ from fastapi import FastAPI, HTTPException
import redis
import uuid
from config import settings
from conf.config import settings
pool = redis.ConnectionPool(host=settings.redishost, port=settings.port, db=settings.db)
r = redis.Redis(connection_pool=pool)

0
app/tests/__init__.py Normal file
View File