File tree Expand file tree Collapse file tree 4 files changed +12
-10
lines changed Expand file tree Collapse file tree 4 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,4 @@ pytest-mock==2.0.0
1212Faker==4.0.2
1313
1414# Coverage
15- coverage==4.5.1
16-
17- # The Debug Toolbar
18- Flask-DebugToolbar==0.11.0
15+ coverage==4.5.1
Original file line number Diff line number Diff line change @@ -28,4 +28,7 @@ SQLAlchemy-Utils==0.36.3
2828flask_sqlalchemy==2.4.1
2929
3030# Handling requests
31- requests==2.23.0
31+ requests==2.23.0
32+
33+ # The Debug Toolbar
34+ Flask-DebugToolbar==0.11.0
Original file line number Diff line number Diff line change 55from flask_restplus ._http import HTTPStatus
66from pytest_mock import MockFixture
77
8+ unexpected_errors_to_be_handled = [pyodbc .OperationalError ]
9+
810
911def test_app_exists (app ):
1012 assert app is not None
1113
1214
13- unexpected_errors_to_be_handled = [pyodbc .OperationalError ]
14-
15-
1615@pytest .mark .parametrize ("error_type" , unexpected_errors_to_be_handled )
1716def test_exceptions_are_handled (error_type , client : FlaskClient , mocker : MockFixture ):
1817 from time_tracker_api .time_entries .time_entries_namespace import time_entries_dao
Original file line number Diff line number Diff line change 22
33from time_tracker_api .security import generate_dev_secret_key
44
5+ DISABLE_STR_VALUES = ("false" , "0" , "disabled" )
6+
57
68class Config :
79 SECRET_KEY = generate_dev_secret_key ()
@@ -32,13 +34,14 @@ class TestConfig(SQLConfig):
3234
3335
3436class ProductionConfig (Config ):
35- DEBUG = False
37+ DEBUG = os . environ . get ( 'DEBUG' , "false" ). lower () not in DISABLE_STR_VALUES
3638 FLASK_DEBUG = True
3739 FLASK_ENV = 'production'
3840
3941
4042class AzureConfig (SQLConfig ):
41- DATABASE_URI = os .environ .get ('SQLAZURECONNSTR_DATABASE_URI' )
43+ DATABASE_URI = os .environ .get ('DATABASE_URI' , os .environ .get ('SQLAZURECONNSTR_DATABASE_URI' ))
44+ SQLALCHEMY_DATABASE_URI = DATABASE_URI
4245
4346
4447class AzureDevelopmentConfig (DevelopmentConfig , AzureConfig ):
You can’t perform that action at this time.
0 commit comments