Skip to content

Commit

Permalink
Unit tests for effective_price
Browse files Browse the repository at this point in the history
  • Loading branch information
bacciotti committed Sep 2, 2024
1 parent 844fc5c commit 99527fb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/test_gcp_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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."""
Expand Down

0 comments on commit 99527fb

Please sign in to comment.