Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasAlbertQC committed Jul 15, 2024
1 parent daaf43c commit c2c28f5
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion quetz/testing/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,18 @@ def session_maker(
trans = sql_connection.begin()

sql_connection.name = "sqlite-test"
yield get_session_maker(sql_connection)

session_maker = get_session_maker(sql_connection)

def wrapper(*args, **kwargs):
"""
Wrapper function that accepts and ignores args / kwargs
to allow for mocking of database.get_session, which accepts
a Config object in the real implementation.
"""
return session_maker()

yield wrapper

if trans is not None:
trans.rollback()
Expand Down

0 comments on commit c2c28f5

Please sign in to comment.