1
0
mirror of https://github.com/spl0k/supysonic.git synced 2024-12-22 08:56:17 +00:00

Silence auth errors from tests

This commit is contained in:
Alban Féron 2024-01-02 15:13:43 +01:00
parent 2209b65d5d
commit 1feaae7637
No known key found for this signature in database
GPG Key ID: 8CE0313646D16165
2 changed files with 7 additions and 2 deletions

View File

@ -1,11 +1,12 @@
# This file is part of Supysonic. # This file is part of Supysonic.
# Supysonic is a Python implementation of the Subsonic server API. # 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. # Distributed under terms of the GNU AGPLv3 license.
import re import re
import logging
from lxml import etree from lxml import etree
@ -22,6 +23,7 @@ class ApiTestBase(TestBase):
def setUp(self, apiVersion="1.12.0"): def setUp(self, apiVersion="1.12.0"):
super().setUp() super().setUp()
logging.getLogger("supysonic.api").addHandler(logging.NullHandler())
self.apiVersion = apiVersion self.apiVersion = apiVersion
xsd = etree.parse(f"tests/assets/subsonic-rest-api-{self.apiVersion}.xsd") xsd = etree.parse(f"tests/assets/subsonic-rest-api-{self.apiVersion}.xsd")
self.schema = etree.XMLSchema(xsd) self.schema = etree.XMLSchema(xsd)

View File

@ -1,10 +1,12 @@
# This file is part of Supysonic. # This file is part of Supysonic.
# Supysonic is a Python implementation of the Subsonic server API. # 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. # Distributed under terms of the GNU AGPLv3 license.
import logging
from ..testbase import TestBase from ..testbase import TestBase
@ -13,6 +15,7 @@ class FrontendTestBase(TestBase):
def setUp(self): def setUp(self):
super().setUp() super().setUp()
logging.getLogger("supysonic.frontend.user").addHandler(logging.NullHandler())
self._patch_client() self._patch_client()
def _login(self, username, password): def _login(self, username, password):