From 59ad411ab9dd9dd32d75501a50f663a8051aed02 Mon Sep 17 00:00:00 2001 From: Mohammad Amin Date: Thu, 29 Feb 2024 17:22:33 +0330 Subject: [PATCH] fix: test case no report and linter issues! --- tests/integration/test_credentials_load.py | 14 ++++++++++++++ utils/process_guild_data.py | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 tests/integration/test_credentials_load.py diff --git a/tests/integration/test_credentials_load.py b/tests/integration/test_credentials_load.py new file mode 100644 index 0000000..c1907c9 --- /dev/null +++ b/tests/integration/test_credentials_load.py @@ -0,0 +1,14 @@ +from unittest import TestCase + +from utils.creds import get_mongo_credentials + + +class TestLoadCredentials(TestCase): + def test_creds_non_empty(self): + creds = get_mongo_credentials() + + self.assertIsNotNone(creds["user"]) + self.assertIsNotNone(creds["password"]) + self.assertIsNotNone(creds["host"]) + self.assertIsNotNone(creds["port"]) + self.assertNotEqual(creds["connection_str"], "mongodb://None:None@None:None") diff --git a/utils/process_guild_data.py b/utils/process_guild_data.py index abe7f83..bf6919c 100644 --- a/utils/process_guild_data.py +++ b/utils/process_guild_data.py @@ -43,7 +43,7 @@ def process_guild_data(platform_document: dict) -> dict[str, str | datetime | No "latest_heatmaps": heatmaps_date, "latest_memberactivities": memberactivities_date, "raw_data_count_30days": raw_data_count, - "guild_members_count": guild_members_count + "guild_members_count": guild_members_count, } return data