Client - disable registration - fix #36

This commit is contained in:
Sam
2019-08-25 12:50:42 +02:00
parent 5b6a94fb85
commit a7de5dd52c
14 changed files with 111 additions and 80 deletions

View File

@ -17,7 +17,7 @@ class BaseConfig:
PICTURE_ALLOWED_EXTENSIONS = {'jpg', 'png', 'gif'}
ACTIVITY_ALLOWED_EXTENSIONS = {'gpx', 'zip'}
REGISTRATION_ALLOWED = (
False if os.getenv('FT_ALLOW_REGISTRATION') == "false" else True
False if os.getenv('REACT_APP_ALLOW_REGISTRATION') == "false" else True
)

View File

@ -13,6 +13,7 @@ os.environ["APP_SETTINGS"] = 'fittrackee_api.config.TestingConfig'
@pytest.fixture
def app():
app = create_app()
app.config['REGISTRATION_ALLOWED'] = True
with app.app_context():
db.create_all()
yield app