2020-09-16 15:41:02 +02:00
|
|
|
from fittrackee.application.models import AppConfig
|
2019-11-13 18:40:01 +01:00
|
|
|
|
|
|
|
|
2020-05-10 15:55:56 +02:00
|
|
|
class TestConfigModel:
|
|
|
|
def test_application_config(self, app):
|
|
|
|
app_config = AppConfig.query.first()
|
|
|
|
assert 1 == app_config.id
|
2019-11-13 18:40:01 +01:00
|
|
|
|
2020-05-10 15:55:56 +02:00
|
|
|
serialized_app_config = app_config.serialize()
|
|
|
|
assert serialized_app_config['gpx_limit_import'] == 10
|
|
|
|
assert serialized_app_config['is_registration_enabled'] is True
|
|
|
|
assert serialized_app_config['max_single_file_size'] == 1048576
|
|
|
|
assert serialized_app_config['max_zip_file_size'] == 10485760
|
|
|
|
assert serialized_app_config['max_users'] == 100
|
2020-09-16 13:01:15 +02:00
|
|
|
assert serialized_app_config['map_attribution'] == (
|
|
|
|
'© <a href="http://www.openstreetmap.org/copyright" '
|
|
|
|
'target="_blank" rel="noopener noreferrer">OpenStreetMap</a> '
|
|
|
|
'contributors'
|
|
|
|
)
|