diff --git a/dags/hivemind_etl_helpers/tests/integration/test_load_envs.py b/dags/hivemind_etl_helpers/tests/integration/test_load_envs.py index 33c7833d..26d715a4 100644 --- a/dags/hivemind_etl_helpers/tests/integration/test_load_envs.py +++ b/dags/hivemind_etl_helpers/tests/integration/test_load_envs.py @@ -1,7 +1,6 @@ import unittest from hivemind_etl_helpers.src.utils.credentials import load_mongo_credentials -from tc_hivemind_backend.db.credentials import load_postgres_credentials class TestCredentialLoadings(unittest.TestCase): @@ -22,23 +21,3 @@ def test_mongo_envs_values(self): self.assertIsInstance(mongo_creds["password"], str) self.assertIsInstance(mongo_creds["host"], str) self.assertIsInstance(mongo_creds["port"], str) - - def test_postgres_envs_type(self): - postgres_creds = load_postgres_credentials() - - self.assertIsInstance(postgres_creds, dict) - - def test_postgres_envs_values(self): - postgres_creds = load_postgres_credentials() - - self.assertNotEqual(postgres_creds["host"], None) - self.assertNotEqual(postgres_creds["password"], None) - self.assertNotEqual(postgres_creds["user"], None) - self.assertNotEqual(postgres_creds["port"], None) - self.assertNotEqual(postgres_creds["db_name"], None) - - self.assertIsInstance(postgres_creds["host"], str) - self.assertIsInstance(postgres_creds["password"], str) - self.assertIsInstance(postgres_creds["user"], str) - self.assertIsInstance(postgres_creds["port"], str) - self.assertIsInstance(postgres_creds["db_name"], str) diff --git a/dags/hivemind_etl_helpers/tests/unit/test_load_model_params.py b/dags/hivemind_etl_helpers/tests/unit/test_load_model_params.py deleted file mode 100644 index 7ef10efa..00000000 --- a/dags/hivemind_etl_helpers/tests/unit/test_load_model_params.py +++ /dev/null @@ -1,40 +0,0 @@ -import os -import unittest - -from tc_hivemind_backend.db.utils.model_hyperparams import load_model_hyperparams - - -class TestLoadModelHyperparams(unittest.TestCase): - def setUp(self): - # Set up environment variables for testing - os.environ["CHUNK_SIZE"] = "128" - os.environ["EMBEDDING_DIM"] = "256" - - def tearDown(self): - # Clean up environment variables after testing - del os.environ["CHUNK_SIZE"] - del os.environ["EMBEDDING_DIM"] - - def test_load_model_hyperparams_success(self): - # Test when environment variables are set correctly - chunk_size, embedding_dim = load_model_hyperparams() - self.assertEqual(chunk_size, 128) - self.assertEqual(embedding_dim, 256) - - def test_load_model_hyperparams_invalid_chunk_size(self): - # Test when CHUNK_SIZE environment variable is not a valid integer - os.environ["CHUNK_SIZE"] = "invalid" - with self.assertRaises(ValueError) as context: - load_model_hyperparams() - self.assertEqual( - str(context.exception), "invalid literal for int() with base 10: 'invalid'" - ) - - def test_load_model_hyperparams_invalid_embedding_dim(self): - # Test when EMBEDDING_DIM environment variable is not a valid integer - os.environ["EMBEDDING_DIM"] = "invalid" - with self.assertRaises(ValueError) as context: - load_model_hyperparams() - self.assertEqual( - str(context.exception), "invalid literal for int() with base 10: 'invalid'" - )