ensure in-memory db mock is used
This commit is contained in:
+7
-2
@@ -10,6 +10,8 @@ from groove.playlist import Playlist
|
||||
from sqlalchemy import create_engine, insert
|
||||
from sqlalchemy.orm import sessionmaker
|
||||
|
||||
from unittest.mock import MagicMock
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True, scope='function')
|
||||
def env():
|
||||
@@ -26,8 +28,11 @@ def auth():
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
def in_memory_engine():
|
||||
return create_engine('sqlite:///:memory:', future=True)
|
||||
def in_memory_engine(monkeypatch):
|
||||
engine = create_engine('sqlite:///:memory:', future=True)
|
||||
monkeypatch.setattr('groove.db.manager.create_engine',
|
||||
MagicMock(return_value=engine))
|
||||
return engine
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
[styles]
|
||||
text = #999999
|
||||
bright = #f1f2f6
|
||||
bold = #f1f2f6 bold
|
||||
dim = #555555
|
||||
link = #9999FF
|
||||
prompt = #f1f2f6 bold
|
||||
artist = #017D93
|
||||
title = #70bc45
|
||||
help = #999999
|
||||
background = #001321
|
||||
error = #FF8888
|
||||
Reference in New Issue
Block a user