From 42283817fe5b769a8e259f460a9d134d3476c2bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alban=20F=C3=A9ron?= Date: Fri, 30 Dec 2022 16:44:09 +0100 Subject: [PATCH] Fix transcoding tests --- tests/api/test_transcoding.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/tests/api/test_transcoding.py b/tests/api/test_transcoding.py index ec131fb..7df3724 100644 --- a/tests/api/test_transcoding.py +++ b/tests/api/test_transcoding.py @@ -1,7 +1,7 @@ # 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-2022 Alban 'spl0k' Féron # # Distributed under terms of the GNU AGPLv3 license. @@ -9,7 +9,6 @@ import unittest import sys from flask import current_app -from pony.orm import db_session from supysonic.db import Track from supysonic.managers.folder import FolderManager @@ -22,13 +21,12 @@ class TranscodingTestCase(ApiTestBase): def setUp(self): super().setUp() - with db_session: - FolderManager.add("Folder", "tests/assets/folder") - scanner = Scanner() - scanner.queue_folder("Folder") - scanner.run() + FolderManager.add("Folder", "tests/assets/folder") + scanner = Scanner() + scanner.queue_folder("Folder") + scanner.run() - self.trackid = Track.get().id + self.trackid = Track.get().id def _stream(self, **kwargs): kwargs.update(