django-fritzconnection_ynh/local_test.py

36 lines
866 B
Python
Raw Normal View History

2022-04-02 17:44:57 +02:00
"""
Build a "local_test" YunoHost installation and start the Django dev. server against it.
Run via:
make local-test
see README for details ;)
"""
from pathlib import Path
try:
from django_yunohost_integration.local_test import create_local_test
except ImportError as err:
raise ImportError('Did you forget to activate a virtual environment?') from err
BASE_PATH = Path(__file__).parent
def main():
create_local_test(
django_settings_path=BASE_PATH / 'conf' / 'settings.py',
destination=BASE_PATH / 'local_test',
runserver=True,
2022-08-16 09:47:54 +02:00
extra_replacements={
'__DEBUG_ENABLED__': '1',
'__LOG_LEVEL__': 'DEBUG',
'__ADMIN_EMAIL__': 'foo-bar@test.tld',
'__DEFAULT_FROM_EMAIL__': 'django_app@test.tld',
},
2022-04-02 17:44:57 +02:00
)
if __name__ == '__main__':
main()