API - update testing config
This commit is contained in:
		@@ -40,3 +40,4 @@ class TestingConfig(BaseConfig):
 | 
				
			|||||||
    BCRYPT_LOG_ROUNDS = 4
 | 
					    BCRYPT_LOG_ROUNDS = 4
 | 
				
			||||||
    TOKEN_EXPIRATION_DAYS = 0
 | 
					    TOKEN_EXPIRATION_DAYS = 0
 | 
				
			||||||
    TOKEN_EXPIRATION_SECONDS = 3
 | 
					    TOKEN_EXPIRATION_SECONDS = 3
 | 
				
			||||||
 | 
					    UPLOAD_FOLDER = '/tmp/fitTrackee/uploads'
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -10,6 +10,10 @@ from fittrackee_api.users.models import User
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
os.environ["FLASK_ENV"] = 'testing'
 | 
					os.environ["FLASK_ENV"] = 'testing'
 | 
				
			||||||
os.environ["APP_SETTINGS"] = 'fittrackee_api.config.TestingConfig'
 | 
					os.environ["APP_SETTINGS"] = 'fittrackee_api.config.TestingConfig'
 | 
				
			||||||
 | 
					# to avoid resetting dev database during tests
 | 
				
			||||||
 | 
					os.environ[
 | 
				
			||||||
 | 
					    "DATABASE_URL"
 | 
				
			||||||
 | 
					] = 'postgres://fittrackee:fittrackee@localhost:5432/fittrackee_test'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def get_app_config(with_config=False):
 | 
					def get_app_config(with_config=False):
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user