From 9e7286d2073b727ee97282ccb6381ea5b35cf9c2 Mon Sep 17 00:00:00 2001 From: NatSquared Date: Thu, 22 Aug 2024 18:21:27 -0700 Subject: [PATCH] DESENG-676: Linting - flake 8 --- met-api/src/met_api/services/engagement_service.py | 2 +- met-api/src/met_api/utils/enums.py | 2 +- met-api/tests/unit/api/test_engagement_content.py | 1 + met-api/tests/utilities/factory_scenarios.py | 12 ++++++------ 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/met-api/src/met_api/services/engagement_service.py b/met-api/src/met_api/services/engagement_service.py index a1fe4095f..ad2a687fa 100644 --- a/met-api/src/met_api/services/engagement_service.py +++ b/met-api/src/met_api/services/engagement_service.py @@ -198,7 +198,7 @@ def _create_engagement_model(engagement_data: dict) -> EngagementModel: def create_default_engagement_content(eng_id): """Create default engagement content for the given engagement ID.""" default_engagement_content = { - 'title': "Summary", + 'title': 'Summary', 'engagement_id': eng_id } try: diff --git a/met-api/src/met_api/utils/enums.py b/met-api/src/met_api/utils/enums.py index aff20a197..382e642df 100644 --- a/met-api/src/met_api/utils/enums.py +++ b/met-api/src/met_api/utils/enums.py @@ -101,4 +101,4 @@ class UserStatus(IntEnum): """User status.""" ACTIVE = 1 - INACTIVE = 2 \ No newline at end of file + INACTIVE = 2 diff --git a/met-api/tests/unit/api/test_engagement_content.py b/met-api/tests/unit/api/test_engagement_content.py index d1e018ab3..cfb6de419 100644 --- a/met-api/tests/unit/api/test_engagement_content.py +++ b/met-api/tests/unit/api/test_engagement_content.py @@ -142,6 +142,7 @@ def test_create_engagement_content_sort(client, jwt, session, assert engagement_contents[1].get('title') == 'Summary' assert engagement_contents[0].get('title') == 'Custom' + def test_create_engagement_content_sort_invalid(client, jwt, session, setup_admin_user_and_claims): # pylint:disable=unused-argument """Assert that a engagement content sort error handling is done.""" diff --git a/met-api/tests/utilities/factory_scenarios.py b/met-api/tests/utilities/factory_scenarios.py index 69776439c..803428fc1 100644 --- a/met-api/tests/utilities/factory_scenarios.py +++ b/met-api/tests/utilities/factory_scenarios.py @@ -882,17 +882,17 @@ class TestEngagementContentInfo(dict, Enum): 'title': 'Summary', 'is_internal': False, 'text_content': fake.text(max_nb_chars=20), - 'json_content': "{\"blocks\":[{\"key\":\"fclgj\",\"text\":\"Rich Content Sample\",\ - \"type\":\"unstyled\",\"depth\":0,\ - \"inlineStyleRanges\":[],\"entityRanges\":[],\"data\":{}}],\"entityMap\":{}}" + 'json_content': '{"blocks":[{"key":"fclgj","text":"Rich Content Sample",\ + "type":"unstyled","depth":0,\ + "inlineStyleRanges":[],"entityRanges":[],"data":{}}],"entityMap":{}}' } content2 = { 'title': 'Custom', 'is_internal': False, 'text_content': fake.text(max_nb_chars=20), - 'json_content': "{\"blocks\":[{\"key\":\"fclgj\",\"text\":\"Rich Content Sample\",\ - \"type\":\"unstyled\",\"depth\":0,\ - \"inlineStyleRanges\":[],\"entityRanges\":[],\"data\":{}}],\"entityMap\":{}}" + 'json_content': '{"blocks":[{"key":"fclgj","text":"Rich Content Sample",\ + "type":"unstyled","depth":0,\ + "inlineStyleRanges":[],"entityRanges":[],"data":{}}],"entityMap":{}}' }