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 66e5b34 commit e2f494f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion quetz/tasks/workers.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def job_wrapper(
pkgstore = kwargs.pop("pkgstore", None)
auth = kwargs.pop("auth", None)
session = kwargs.pop("session", None)

kwargs.pop("dao", None)
kwargs.pop("db", None)
with get_session(config) as db:
user_id: Optional[str]
Expand Down
8 changes: 6 additions & 2 deletions quetz/tests/test_jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -866,9 +866,13 @@ def sync_supervisor(db, dao, config):

@pytest.fixture
def mock_action(mocker):
func = mocker.Mock()
m = mocker.Mock()

def func(*args, **kwargs):
m(*args, **kwargs)

mocker.patch("quetz.jobs.handlers.JOB_HANDLERS", {"test_action": func})
return func
return m


def test_update_job_status(sync_supervisor, db, action_job):
Expand Down

0 comments on commit e2f494f

Please sign in to comment.