Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions tests/helper_beets.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import beets.test._common
import werkzeug.serving
from beets.test.helper import PluginMixin as BeetsPluginMixin
from beets.test.helper import TestHelper as BeetsTestHelper
from beets.util import bytestring_path
from beetsplug.web import app as beets_web_app
Expand All @@ -31,9 +32,11 @@ class BeetsAlbum(NamedTuple):
beets.test._common.RSRC = bytestring_path(TEST_DATA_DIRECTORY / "beets-rsrc") # noqa: SLF001


class BeetsLibrary(BeetsTestHelper):
class BeetsLibrary(BeetsPluginMixin, BeetsTestHelper):
"""Provide a temporary Beets library for testing against a real Beets web plugin."""

db_on_disk = True

def __init__(
self,
bind_host: str = "127.0.0.1",
Expand All @@ -49,7 +52,7 @@ def __init__(
self._bind_port = bind_port
self._server = None

self.setup_beets(disk=True)
self.setup_beets()
self._app.config["lib"] = self.lib
self.load_plugins("web")
# prepare the server instance
Expand Down
Loading