Coverage for src / mesh / tests / settings.py: 100%

25 statements  

« prev     ^ index     » next       coverage.py v7.13.1, created at 2026-08-11 09:47 +0000

1# ruff: noqa: F401 

2 

3import os 

4 

5import ptf 

6 

7from mesh_site.settings import AUTHENTICATION_BACKENDS, INSTALLED_APPS, MIDDLEWARE, TEMPLATES 

8 

9BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 

10ptf_app_dir = os.path.dirname(os.path.dirname(os.path.abspath(ptf.__file__))) 

11RESOURCES_ROOT = "/mesh_test_data" 

12MESH_FILES_DIRECTORY = "/tmp/MESH" 

13STATIC_URL = "../static/" 

14 

15ROOT_URLCONF = "mesh.tests.urls" 

16LOGIN_REDIRECT_URL = "mesh:home" 

17 

18 

19ALLOWED_HOSTS = ["*"] 

20SECRET_KEY = "change me" 

21 

22DEBUG = True 

23 

24DATABASES = {"default": {"ENGINE": "django.db.backends.sqlite3"}} 

25 

26EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend" 

27DEFAULT_FROM_EMAIL = "no_reply@listes.mathdoc.fr" 

28MESH_JOURNAL_EMAIL_CONTACT = "contact@journal.fr" 

29 

30SENDFILE_BACKEND = "django_sendfile.backends.development" 

31 

32COLLECTION_PID = "ALL" 

33SITE_NAME = "MESH Site" 

34SITE_ID = 1 

35MESH_COLID = "MESH" 

36SITE_DOMAIN = "MESH domain" 

37 

38AUTH_PASSWORD_VALIDATORS = [ 

39 { 

40 "NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator", 

41 }, 

42 { 

43 "NAME": "django.contrib.auth.password_validation.MinimumLengthValidator", 

44 "OPTIONS": {"min_length": 9}, 

45 }, 

46 { 

47 "NAME": "django.contrib.auth.password_validation.CommonPasswordValidator", 

48 }, 

49 { 

50 "NAME": "django.contrib.auth.password_validation.NumericPasswordValidator", 

51 }, 

52] 

53 

54AUTH_USER_MODEL = "mesh.User"