From cd2327aef793bb8f9c6f1613b95a4d290f92d537 Mon Sep 17 00:00:00 2001 From: philip306 Date: Thu, 30 Jul 2020 09:40:21 -0400 Subject: [PATCH] reorg config and tests --- app/config.py | 11 ----------- app/main.py | 2 +- app/tests/__init__.py | 0 app/{ => tests}/test_main.py | 0 4 files changed, 1 insertion(+), 12 deletions(-) delete mode 100644 app/config.py create mode 100644 app/tests/__init__.py rename app/{ => tests}/test_main.py (100%) diff --git a/app/config.py b/app/config.py deleted file mode 100644 index 35f76fe..0000000 --- a/app/config.py +++ /dev/null @@ -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() \ No newline at end of file diff --git a/app/main.py b/app/main.py index 21d87d5..48ef235 100644 --- a/app/main.py +++ b/app/main.py @@ -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) diff --git a/app/tests/__init__.py b/app/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/app/test_main.py b/app/tests/test_main.py similarity index 100% rename from app/test_main.py rename to app/tests/test_main.py