Skip to content

Commit

Permalink
chore: formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
kpsherva committed Sep 26, 2024
1 parent fe96436 commit 36e59c7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
3 changes: 3 additions & 0 deletions invenio_jobs/services/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@


class AttrDict(dict):
"""Helper class to fake API layer."""

def __init__(self, *args, **kwargs):
"""Constructor."""
super(AttrDict, self).__init__(*args, **kwargs)
self.__dict__ = self

Expand Down
10 changes: 1 addition & 9 deletions invenio_jobs/services/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,7 @@

from invenio_i18n import lazy_gettext as _
from invenio_users_resources.services import schemas as user_schemas
from marshmallow import (
EXCLUDE,
Schema,
fields,
post_load,
pre_dump,
pre_load,
validate,
)
from marshmallow import EXCLUDE, Schema, fields, post_load, pre_dump, pre_load, validate
from marshmallow_oneofschema import OneOfSchema
from marshmallow_utils.fields import SanitizedUnicode, TZDateTime
from marshmallow_utils.permissions import FieldPermissionsMixin
Expand Down
8 changes: 4 additions & 4 deletions tests/resources/test_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def test_simple_flow(mock_apply_async, app, db, client, user):
list_repr = deepcopy(expected_job)
list_repr.update(
{
"last_run": {"queue": "celery", "title": "Manual run"},
"last_run": {"title": "Manual run"},
"last_runs": {
"cancelled": {},
"cancelling": {},
Expand Down Expand Up @@ -324,7 +324,7 @@ def test_jobs_search(client, jobs):
"type": "interval",
"hours": 4,
},
"last_run": {"queue": "celery", "title": "Manual run"},
"last_run": {"title": "Manual run"},
"last_runs": {
"cancelled": {},
"cancelling": {},
Expand Down Expand Up @@ -360,7 +360,7 @@ def test_jobs_search(client, jobs):
"day_of_month": "*",
"month_of_year": "*",
},
"last_run": {"queue": "celery", "title": "Manual run"},
"last_run": {"title": "Manual run"},
"last_runs": {
"cancelled": {},
"cancelling": {},
Expand Down Expand Up @@ -389,7 +389,7 @@ def test_jobs_search(client, jobs):
"default_queue": "low",
"default_args": "{}",
"schedule": None,
"last_run": {"queue": "celery", "title": "Manual run"},
"last_run": {"title": "Manual run"},
"last_runs": {
"cancelled": {},
"cancelling": {},
Expand Down

0 comments on commit 36e59c7

Please sign in to comment.