Coverage for config.py: 100%

11 statements  

« prev     ^ index     » next       coverage.py v7.8.0, created at 2025-04-20 21:23 +0000

1import os 

2from dotenv import load_dotenv 

3 

4 

5basedir = os.path.abspath(os.path.dirname(__file__)) 

6load_dotenv(os.path.join(basedir, ".env")) 

7 

8 

9class Config: 

10 """ 

11 Author: Troy Witmer 

12 Date: 02/06/2025 

13 Description: Config File for the flask app, will be the entrypoint for all 

14 env variables and other app configuration 

15 """ 

16 

17 SECRET_KEY = os.environ.get("SECRET_KEY") or "you-will-never-guess" 

18 SQLALCHEMY_DATABASE_URI = os.environ.get("DATABASE_URI") 

19 SQLALCHEMY_TRACK_MODIFICATIONS = False 

20 

21 

22class TestingConfig(Config): 

23 """ 

24 Author: Troy Witmer 

25 Date: 02/20/2025 

26 Description: Config File for app in testing configuration, called in pytest creation 

27 

28 param:Config the class above to get all its keys, we add some extra and override some in here 

29 """ 

30 

31 TESTING = True 

32 SQLALCHEMY_DATABASE_URI = os.environ.get("TEST_DATABASE_URI")