diff --git a/app/models/evaluations.py b/app/models/evaluations.py
index 0c7d1213b081402e55ef0c209791f8befb267100..b5ff3a6757b5a4f4a4772f694699e939a3843177 100644
--- a/app/models/evaluations.py
+++ b/app/models/evaluations.py
@@ -184,7 +184,7 @@ class Evaluation(db.Model):
         # ScoDoc7 output_formators
         e_dict["evaluation_id"] = self.id
         e_dict["date_debut"] = self.date_debut.isoformat() if self.date_debut else None
-        e_dict["date_fin"] = self.date_debut.isoformat() if self.date_fin else None
+        e_dict["date_fin"] = self.date_fin.isoformat() if self.date_fin else None
         e_dict["numero"] = self.numero or 0
         e_dict["poids"] = self.get_ue_poids_dict()  # { ue_id : poids }
 
diff --git a/sco_version.py b/sco_version.py
index 98421bebef66cc0d9cb9162c5d401695267c21f0..f683bf52a273e6faa54e986ca35ecf2cad53e9cb 100644
--- a/sco_version.py
+++ b/sco_version.py
@@ -1,7 +1,7 @@
 # -*- mode: python -*-
 # -*- coding: utf-8 -*-
 
-SCOVERSION = "9.6.80"
+SCOVERSION = "9.6.81"
 
 SCONAME = "ScoDoc"
 
diff --git a/tests/api/setup_test_api.py b/tests/api/setup_test_api.py
index c34867d1d5c9519b69734d2f31d4c358bf8e14ee..f564b9d1569df7ae227f063f507096763a5748bf 100644
--- a/tests/api/setup_test_api.py
+++ b/tests/api/setup_test_api.py
@@ -15,8 +15,18 @@ Utilisation :
 """
 import os
 import requests
-from dotenv import load_dotenv
-import pytest
+
+try:
+    from dotenv import load_dotenv
+except ModuleNotFoundError:
+    print("\nWarning: dotenv not installed, ignoring .env")
+    print("You may install it using:\npip install python-dotenv\n")
+    load_dotenv = None
+try:
+    import pytest
+except ModuleNotFoundError:
+    print("pytest not installed\n")
+    pytest = None
 
 # --- Lecture configuration (variables d'env ou .env)
 try:
@@ -24,9 +34,11 @@ try:
 except NameError:
     BASEDIR = "/opt/scodoc/tests/api"
 
-load_dotenv(os.path.join(BASEDIR, ".env"))
+if load_dotenv:
+    load_dotenv(os.path.join(BASEDIR, ".env"))
+
 CHECK_CERTIFICATE = bool(os.environ.get("CHECK_CERTIFICATE", False))
-SCODOC_URL = os.environ["SCODOC_URL"] or "http://localhost:5000"
+SCODOC_URL = os.environ.get("SCODOC_URL") or "http://localhost:5000"
 API_URL = SCODOC_URL + "/ScoDoc/api"
 API_USER = os.environ.get("API_USER", "test")
 API_PASSWORD = os.environ.get("API_PASSWORD", os.environ.get("API_PASSWD", "test"))
@@ -36,6 +48,7 @@ DEPT_ACRONYM = "TAPI"
 SCO_TEST_API_TIMEOUT = 5
 print(f"SCODOC_URL={SCODOC_URL}")
 print(f"API URL={API_URL}")
+print(f"API_USER={API_USER}")
 
 
 class APIError(Exception):
@@ -53,16 +66,17 @@ def get_auth_headers(user, password) -> dict:
     return {"Authorization": f"Bearer {token}"}
 
 
-@pytest.fixture
-def api_headers() -> dict:
-    """Jeton, utilisateur API ordinaire"""
-    return get_auth_headers(API_USER, API_PASSWORD)
+if pytest:
 
+    @pytest.fixture
+    def api_headers() -> dict:
+        """Jeton, utilisateur API ordinaire"""
+        return get_auth_headers(API_USER, API_PASSWORD)
 
-@pytest.fixture
-def api_admin_headers() -> dict:
-    """Jeton, utilisateur API SuperAdmin"""
-    return get_auth_headers(API_USER_ADMIN, API_PASSWORD_ADMIN)
+    @pytest.fixture
+    def api_admin_headers() -> dict:
+        """Jeton, utilisateur API SuperAdmin"""
+        return get_auth_headers(API_USER_ADMIN, API_PASSWORD_ADMIN)
 
 
 def GET(path: str, headers: dict = None, errmsg=None, dept=None):