From 0cd920d5dc73eb96bdacf9f1a3a5180059c2347e Mon Sep 17 00:00:00 2001 From: DonHaul Date: Wed, 21 Aug 2024 09:54:32 +0200 Subject: [PATCH] precommit: fix main tests --- backoffice/backoffice/workflows/api/views.py | 2 +- backoffice/backoffice/workflows/documents.py | 2 +- .../backoffice/workflows/tests/test_views.py | 44 +++++-------------- 3 files changed, 12 insertions(+), 36 deletions(-) diff --git a/backoffice/backoffice/workflows/api/views.py b/backoffice/backoffice/workflows/api/views.py index 064d7229..42df6630 100644 --- a/backoffice/backoffice/workflows/api/views.py +++ b/backoffice/backoffice/workflows/api/views.py @@ -267,7 +267,7 @@ def __init__(self, *args, **kwargs): filter_fields = { "status": "status", "workflow_type": "workflow_type", - "is_update": "is_update" + "is_update": "is_update", } ordering_fields = {"_updated_at": "_updated_at"} diff --git a/backoffice/backoffice/workflows/documents.py b/backoffice/backoffice/workflows/documents.py index 3db73dc8..62e2aa06 100644 --- a/backoffice/backoffice/workflows/documents.py +++ b/backoffice/backoffice/workflows/documents.py @@ -28,7 +28,7 @@ class WorkflowDocument(Document): "value": fields.KeywordField(), "current": fields.BooleanField(), } - ) + ), } ) status = fields.KeywordField() diff --git a/backoffice/backoffice/workflows/tests/test_views.py b/backoffice/backoffice/workflows/tests/test_views.py index a1bcbdad..8775b0b6 100644 --- a/backoffice/backoffice/workflows/tests/test_views.py +++ b/backoffice/backoffice/workflows/tests/test_views.py @@ -404,25 +404,13 @@ def setUpClass(cls): Workflow.objects.update_or_create( data={ "ids": [ - { - "value": "0000-0003-3302-3333", - "schema": "ORCID" - }, - { - "value": "CastleFrank", - "schema": "INSPIRE BAI" - } + {"value": "0000-0003-3302-3333", "schema": "ORCID"}, + {"value": "CastleFrank", "schema": "INSPIRE BAI"}, ], - "name": { - "value": "Castle, Frank", - "preferred_name": "Frank Castle" - }, + "name": {"value": "Castle, Frank", "preferred_name": "Frank Castle"}, "email_addresses": [ - { - "value": "frank.castle@someting.ch", - "current": True - } - ] + {"value": "frank.castle@someting.ch", "current": True} + ], }, status=StatusChoices.APPROVAL, core=True, @@ -432,25 +420,13 @@ def setUpClass(cls): Workflow.objects.update_or_create( data={ "ids": [ - { - "value": "0000-0003-3302-2222", - "schema": "ORCID" - }, - { - "value": "SmithJohn", - "schema": "INSPIRE BAI" - } + {"value": "0000-0003-3302-2222", "schema": "ORCID"}, + {"value": "SmithJohn", "schema": "INSPIRE BAI"}, ], - "name": { - "value": "Smith, John", - "preferred_name": "John Smith" - }, + "name": {"value": "Smith, John", "preferred_name": "John Smith"}, "email_addresses": [ - { - "value": "john.smith@someting.ch", - "current": True - } - ] + {"value": "john.smith@someting.ch", "current": True} + ], }, status=StatusChoices.RUNNING, core=True,