Skip to content

Commit 08fcac0

Browse files
committed
Separate fixture for DB creds dict
1 parent 37248ff commit 08fcac0

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

tests/conftest.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import datajoint as dj
22
from packaging import version
3+
from typing import Dict
34
import os
45
from os import environ, remove
56
import minio
@@ -52,12 +53,17 @@ def enable_filepath_feature(monkeypatch):
5253

5354

5455
@pytest.fixture(scope="session")
55-
def connection_root_bare():
56-
connection = dj.Connection(
56+
def db_creds_root() -> Dict:
57+
return dict(
5758
host=os.getenv("DJ_HOST"),
5859
user=os.getenv("DJ_USER"),
5960
password=os.getenv("DJ_PASS"),
6061
)
62+
63+
64+
@pytest.fixture(scope="session")
65+
def connection_root_bare(db_creds_root):
66+
connection = dj.Connection(**db_creds_root)
6167
yield connection
6268

6369

0 commit comments

Comments
 (0)