diff --git a/app/analyse/analyseur_log_apache.py b/app/analyse/analyseur_log_apache.py index 09a7edd..cf7b727 100644 --- a/app/analyse/analyseur_log_apache.py +++ b/app/analyse/analyseur_log_apache.py @@ -121,6 +121,7 @@ def get_analyse_complete(self) -> dict: - total_entrees_filtre: voir :meth:`get_total_entrees_filtre` - requetes: - top_urls: voir :meth:`get_top_urls` + - reponses: - repartition_code_statut_http: voir :meth:`get_total_par_code_statut_http` Returns: @@ -134,6 +135,8 @@ def get_analyse_complete(self) -> dict: "total_entrees_filtre": self.get_total_entrees_filtre(), "requetes": { "top_urls": self.get_top_urls(), + }, + "reponses": { "repartition_code_statut_http": self.get_total_par_code_statut_http() } } diff --git a/tests/test_analyseur_log_apache.py b/tests/test_analyseur_log_apache.py index 4481027..aabdf38 100644 --- a/tests/test_analyseur_log_apache.py +++ b/tests/test_analyseur_log_apache.py @@ -332,6 +332,7 @@ def test_analyseur_get_analyse_complete_valide(analyseur_log_apache): assert statistiques["total_entrees_filtre"] == analyseur_log_apache.get_total_entrees_filtre() statistiques_requetes = statistiques["requetes"] assert statistiques_requetes["top_urls"] == analyseur_log_apache.get_top_urls() - assert (statistiques_requetes["repartition_code_statut_http"] + statistiques_reponses = statistiques["reponses"] + assert (statistiques_reponses["repartition_code_statut_http"] == analyseur_log_apache.get_total_par_code_statut_http()) \ No newline at end of file