From 99527fbf47b31552a8aab0aa78431f6076963019 Mon Sep 17 00:00:00 2001 From: Lucas Bacciotti Date: Mon, 2 Sep 2024 12:16:25 +0100 Subject: [PATCH] Unit tests for effective_price --- tests/test_gcp_generator.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_gcp_generator.py b/tests/test_gcp_generator.py index 372c6a28..4cd492f0 100644 --- a/tests/test_gcp_generator.py +++ b/tests/test_gcp_generator.py @@ -66,6 +66,7 @@ def setUp(self): "resource.name": "resource-name", "resource.global_name": "global-name", "resource_level": True, + "price.effective_price": 0.04524, } self.now = datetime.now().replace(microsecond=0, second=0, minute=0) self.yesterday = self.now - timedelta(days=1) @@ -126,6 +127,7 @@ def test_compute_engine_init_with_usage_attributes(self): generated_data = generator.generate_data() list_data = list(generated_data) self.assertEqual(list_data[0]["cost"], self.usage_attributes["usage.amount"] * self.usage_attributes["price"]) + self.assertIn("price.effective_price", list_data[0]) def test_compute_engine_init_with_sku_attributes(self): """Test the init with sku attributes for Compute Engine."""