From 1feaae76377f40a509a5633de71fb35786d0dd5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alban=20F=C3=A9ron?= Date: Tue, 2 Jan 2024 15:13:43 +0100 Subject: [PATCH] Silence auth errors from tests --- tests/api/apitestbase.py | 4 +++- tests/frontend/frontendtestbase.py | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/api/apitestbase.py b/tests/api/apitestbase.py index e662625..3531efe 100644 --- a/tests/api/apitestbase.py +++ b/tests/api/apitestbase.py @@ -1,11 +1,12 @@ # This file is part of Supysonic. # Supysonic is a Python implementation of the Subsonic server API. # -# Copyright (C) 2017-2020 Alban 'spl0k' Féron +# Copyright (C) 2017-2024 Alban 'spl0k' Féron # # Distributed under terms of the GNU AGPLv3 license. import re +import logging from lxml import etree @@ -22,6 +23,7 @@ class ApiTestBase(TestBase): def setUp(self, apiVersion="1.12.0"): super().setUp() + logging.getLogger("supysonic.api").addHandler(logging.NullHandler()) self.apiVersion = apiVersion xsd = etree.parse(f"tests/assets/subsonic-rest-api-{self.apiVersion}.xsd") self.schema = etree.XMLSchema(xsd) diff --git a/tests/frontend/frontendtestbase.py b/tests/frontend/frontendtestbase.py index 8d23eaf..7a885ba 100644 --- a/tests/frontend/frontendtestbase.py +++ b/tests/frontend/frontendtestbase.py @@ -1,10 +1,12 @@ # This file is part of Supysonic. # Supysonic is a Python implementation of the Subsonic server API. # -# Copyright (C) 2017-2018 Alban 'spl0k' Féron +# Copyright (C) 2017-2024 Alban 'spl0k' Féron # # Distributed under terms of the GNU AGPLv3 license. +import logging + from ..testbase import TestBase @@ -13,6 +15,7 @@ class FrontendTestBase(TestBase): def setUp(self): super().setUp() + logging.getLogger("supysonic.frontend.user").addHandler(logging.NullHandler()) self._patch_client() def _login(self, username, password):